:root {
  --navy: #0F2A4A;
  --navy-2: #173a63;
  --amber: #F5A623;
  --teal: #1FA79A;
  --bg: #F7F9FC;
  --text: #1A2433;
  --muted: #657386;
  --line: #DDE5EF;
  --danger: #B42318;
  --surface: #FFFFFF;
  --surface-2: #F4F7FB;
  --field: #FFFFFF;
  --shadow-color: rgba(15, 42, 74, .12);
  --shadow: 0 18px 50px rgba(15, 42, 74, .12);
}

[data-theme="dark"] {
  --navy: #DCEBFF;
  --navy-2: #9FC5F8;
  --amber: #FFC45B;
  --teal: #39D0C2;
  --bg: #09111F;
  --text: #ECF4FF;
  --muted: #AAB8CB;
  --line: #22334A;
  --danger: #FF8A80;
  --surface: #101B2D;
  --surface-2: #0C1626;
  --field: #0B1422;
  --shadow-color: rgba(0, 0, 0, .34);
  --shadow: 0 18px 50px rgba(0, 0, 0, .34);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(245, 166, 35, .55);
  outline-offset: 2px;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  background: var(--navy);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(221, 229, 239, .9);
}
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--navy);
  font-family: Sora, Inter, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}
.brand-logo {
  display: block;
  width: 128px;
  height: auto;
  background: transparent;
}
.hero-brand-logo {
  display: block;
  width: min(430px, 82vw);
  height: auto;
  margin-bottom: 22px;
  background: transparent;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,.28));
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0F2A4A;
  color: var(--amber);
  box-shadow: 0 10px 24px rgba(15,42,74,.18);
}
.nav-link { color: var(--navy); font-weight: 700; font-size: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #13253a; box-shadow: 0 14px 30px rgba(245, 166, 35, .24); }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: color-mix(in srgb, var(--navy) 22%, transparent); }
.btn-dark { background: #0F2A4A; color: white; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-danger { background: #fff2f0; color: var(--danger); border-color: #ffccc7; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15,42,74,.94), rgba(15,42,74,.72) 46%, rgba(15,42,74,.14)),
    linear-gradient(180deg, rgba(15,42,74,.06), rgba(15,42,74,.54)),
    url("https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=2200&q=90") center/cover;
  color: white;
}
.hero .container { padding: 88px 0 132px; }
.hero h1, .page-title, .section-title {
  font-family: Sora, Inter, sans-serif;
  letter-spacing: 0;
}
.hero h1 { font-size: clamp(42px, 7vw, 84px); line-height: 1; max-width: 820px; }
.hero p { max-width: 680px; color: rgba(255,255,255,.88); font-size: clamp(17px, 2.5vw, 21px); line-height: 1.6; }
.hero-layout {
  display: block;
  max-width: 820px;
}
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.hero-proof-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  font-weight: 800;
}
.hero-proof-item i {
  color: var(--amber);
}
.hero-next {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(42%);
}
.hero-next-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: var(--surface);
  color: var(--text);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 16px;
}
.kpi-mini { display: flex; gap: 12px; align-items: center; min-width: 0; }
.icon-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--navy);
  color: var(--amber);
}
.card {
  background: var(--surface);
  border: 1px solid rgba(221,229,239,.9);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(15,42,74,.08);
}
.course-card,
.partner-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.course-card {
  overflow: hidden;
}
.course-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: -20px -20px 18px;
  overflow: hidden;
  background: #DDE5EF;
}
.course-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}
.course-card:hover .course-card-media img {
  transform: scale(1.035);
}
.course-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,42,74,0) 34%, rgba(15,42,74,.7));
}
.course-card-media .badge,
.course-card-media .course-lock {
  position: absolute;
  z-index: 1;
}
.course-card-media .badge {
  left: 14px;
  bottom: 14px;
}
.course-lock {
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
}
.card-action {
  margin-top: auto;
  padding-top: 18px;
}
.auth-golden {
  background:
    linear-gradient(135deg, rgba(15,42,74,.98), rgba(23,58,99,.94)),
    #0F2A4A;
  color: #F7FBFF;
  border-color: rgba(255,255,255,.12);
}
.auth-golden .section-title,
.auth-golden strong {
  color: #F7FBFF;
}
.step-badge {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(245,166,35,.16);
  color: var(--amber);
  font-weight: 900;
}
.section { padding: 72px 0; }
.page { padding: 34px 0 72px; flex: 1; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31,167,154,.12);
  color: #087267;
  font-weight: 800;
  font-size: 12px;
}
.badge-amber { background: rgba(245,166,35,.16); color: color-mix(in srgb, var(--amber) 48%, #3c2600); }
.badge-navy { background: rgba(15,42,74,.1); color: var(--navy); }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal); border-radius: inherit; transition: width .25s ease; }
.locked { position: relative; overflow: hidden; }
.locked .lockable { filter: blur(3px); opacity: .52; pointer-events: none; }
.lock-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.form-field { display: grid; gap: 7px; }
.form-field label { font-size: 13px; font-weight: 800; color: var(--navy); }
.input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--field);
}
textarea.input { min-height: 110px; resize: vertical; }
.error { color: var(--danger); font-size: 12px; font-weight: 700; min-height: 16px; }
.app-footer { margin-top: auto; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); }
#toastHost { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: white; padding: 14px 16px; border-radius: 8px; box-shadow: var(--shadow); animation: toast-in .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15,42,74,.48);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal { width: min(620px, 100%); max-height: min(760px, 92vh); overflow: auto; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); }
.chat-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: min(380px, calc(100vw - 28px));
}
.chat-launcher {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(245, 166, 35, .38);
  box-shadow: 0 18px 42px rgba(15, 42, 74, .26);
}
.chat-panel {
  height: min(560px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}
.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #0F2A4A;
  color: white;
}
.chat-header-title {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chat-header-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(245, 166, 35, .16);
  color: var(--amber);
}
.chat-close {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: white;
}
.chat-log {
  overflow: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--teal) 10%, transparent), transparent 34%),
    var(--surface-2);
}
.chat-empty {
  align-self: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.bubble { max-width: 84%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.bubble.user { justify-self: end; background: var(--navy); color: white; border-bottom-right-radius: 4px; }
.bubble.ia { justify-self: start; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-compose {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.chat-compose .input {
  min-height: 48px;
  border-radius: 12px;
}
.chat-send {
  min-height: 48px;
  padding: 0;
  border-radius: 14px;
}
.notif-bubble { background: #DCF8C6; border-radius: 8px; padding: 12px; box-shadow: 0 8px 20px rgba(15,42,74,.07); }
.cert {
  aspect-ratio: 1.42 / 1;
  background: var(--surface);
  border: 10px solid var(--navy);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
}
[data-theme="dark"] .text-slate-400,
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-700 {
  color: var(--muted) !important;
}
[data-theme="dark"] .bg-white {
  background-color: var(--surface) !important;
}
[data-theme="dark"] .bg-\[var\(--navy\)\] {
  background-color: #10294A !important;
}
[data-theme="dark"] .bg-black {
  background-color: #050914 !important;
}
[data-theme="dark"] .text-white {
  color: #F7FBFF !important;
}
[data-theme="dark"] .card {
  border-color: var(--line);
}
[data-theme="dark"] .course-lock {
  background: rgba(16, 27, 45, .9);
}
[data-theme="dark"] .notif-bubble {
  background: #173A31;
  color: var(--text);
}
[data-theme="dark"] .bubble.user {
  background: #173A63;
}
[data-theme="dark"] .chat-launcher {
  background: #10294A;
  color: white;
  border-color: rgba(245, 166, 35, .55);
}
[data-theme="dark"] .brand-logo,
[data-theme="dark"] .hero-brand-logo {
  filter: drop-shadow(0 12px 26px rgba(0,0,0,.3));
}
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti span {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  background: var(--amber);
  animation: fall 1200ms linear forwards;
}
@keyframes fall { to { transform: translateY(105vh) rotate(420deg); opacity: .4; } }
@media (max-width: 767px) {
  .container { width: min(100% - 24px, 1180px); }
  .hero { min-height: 92vh; }
  .hero .container { padding: 54px 0 150px; }
  .hero-proof-item { width: 100%; justify-content: center; }
  .hero-next { transform: translateY(58%); }
  .hero-next-inner { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .topbar nav { overflow-x: auto; }
  .chat-widget { left: 14px; right: 14px; width: auto; }
  .chat-panel { height: 70vh; }
  .btn { white-space: normal; }
}

/* Premium Netflix-style edition */
:root {
  --premium-bg: #050505;
  --premium-panel: #101010;
  --premium-panel-2: #151515;
  --premium-line: #262626;
  --premium-text: #f8fafc;
  --premium-muted: #a8b0bd;
  --premium-yellow: #ffd400;
  --premium-red: #e50914;
}

.premium-shell,
[data-theme="dark"] .premium-shell {
  background: var(--premium-bg);
  color: var(--premium-text);
}

.premium-shell .topbar {
  background: linear-gradient(180deg, rgba(0,0,0,.94), rgba(0,0,0,.68));
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.premium-shell .brand-logo {
  width: 136px;
}

.premium-nav {
  flex: 1;
}

.premium-shell .nav-link {
  color: rgba(255,255,255,.76);
}

.premium-shell .nav-link:hover {
  color: var(--premium-yellow);
}

.premium-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.premium-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 32vw);
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: var(--premium-muted);
}

.premium-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--premium-text);
}

.premium-search input::placeholder {
  color: rgba(255,255,255,.46);
}

.premium-theme {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--premium-yellow);
}

.premium-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--premium-yellow);
  background: #0d0d0d;
  color: var(--premium-yellow);
  font-weight: 900;
}

.premium-hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,0,0,.94), rgba(0,0,0,.62) 42%, rgba(0,0,0,.12)),
    linear-gradient(180deg, rgba(0,0,0,.12), var(--premium-bg) 92%),
    var(--hero-img) center/cover;
}

.premium-hero-content {
  padding: 118px 0 120px;
  max-width: 1180px;
}

.premium-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--premium-yellow);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.premium-hero .hero-brand-logo {
  width: min(360px, 70vw);
  margin: 24px 0 18px;
}

.premium-hero h1 {
  max-width: 850px;
  color: white;
  font-family: Sora, Inter, sans-serif;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .96;
  font-weight: 900;
}

.premium-hero p {
  max-width: 680px;
  margin-top: 18px;
  color: rgba(255,255,255,.82);
  font-size: 19px;
  line-height: 1.55;
}

.premium-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.premium-shell .btn-primary {
  background: var(--premium-yellow);
  color: #080808;
  box-shadow: 0 18px 42px rgba(255,212,0,.2);
}

.premium-shell .btn-secondary {
  background: rgba(255,255,255,.08);
  color: white;
  border-color: rgba(255,255,255,.18);
}

.premium-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.premium-stats div {
  min-width: 150px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}

.premium-stats span {
  display: block;
  color: var(--premium-yellow);
  font-size: 28px;
  font-weight: 900;
}

.premium-stats small {
  color: var(--premium-muted);
}

.premium-content {
  padding: 26px 0 86px;
}

.premium-rail {
  margin-top: 42px;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rail-heading h2 {
  position: relative;
  padding-left: 16px;
  color: white;
  font-size: 24px;
  font-weight: 900;
}

.rail-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 999px;
  background: var(--premium-yellow);
}

.rail-heading a {
  color: var(--premium-muted);
  font-weight: 800;
}

.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.premium-shell .course-card,
.premium-shell .partner-card,
.premium-shell .card {
  background: var(--premium-panel);
  border-color: var(--premium-line);
  color: var(--premium-text);
  box-shadow: none;
}

.premium-shell .course-card {
  scroll-snap-align: start;
  padding: 0;
  min-height: 430px;
  transition: transform .18s ease, border-color .18s ease;
}

.premium-shell .course-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(255,212,0,.55);
}

.premium-shell .course-card-media {
  margin: 0 0 16px;
  aspect-ratio: 16 / 9;
}

.premium-shell .course-card h3,
.premium-shell .course-card p,
.premium-shell .course-card > div:not(.course-card-media):not(.card-action) {
  padding-left: 16px;
  padding-right: 16px;
}

.premium-shell .course-card h3 {
  color: white !important;
  font-size: 22px;
  line-height: 1.05;
}

.premium-shell .course-card p {
  color: var(--premium-muted) !important;
}

.premium-shell .course-card .badge {
  background: var(--premium-yellow);
  color: #080808;
}

.premium-shell .course-lock {
  background: rgba(0,0,0,.62);
  color: var(--premium-yellow);
}

.premium-shell .card-action {
  padding: 16px;
}

.premium-shell .pricing-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.premium-shell .pricing-card h2 {
  min-height: 68px;
  color: white !important;
}

.premium-shell .pricing-card p {
  min-height: 72px;
  color: var(--premium-muted) !important;
}

.premium-shell .pricing-price {
  margin-top: 18px;
  color: white;
}

.premium-shell .pricing-action {
  margin-top: auto;
  padding-top: 24px;
}

.premium-market-lock {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: 48px;
  padding: 28px;
  border: 1px solid rgba(255,212,0,.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,212,0,.1), rgba(255,212,0,0)),
    var(--premium-panel);
}

.premium-market-lock h2 {
  margin-top: 10px;
  color: white;
  font-size: 28px;
  font-weight: 900;
}

.premium-market-lock p {
  margin-top: 8px;
  color: var(--premium-muted);
}

.premium-shell .page {
  background: var(--premium-bg);
}

.premium-shell .page-title,
.premium-shell .section-title {
  color: white !important;
}

.premium-shell .input {
  background: #0a0a0a;
  border-color: var(--premium-line);
  color: white;
}

.premium-shell .badge {
  background: rgba(255,212,0,.14);
  color: var(--premium-yellow);
}

.premium-shell .locked .lock-overlay {
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
}

.premium-shell .progress > span {
  background: var(--premium-yellow);
}

@media (max-width: 900px) {
  .premium-search { display: none; }
  .premium-nav { overflow-x: auto; }
  .premium-hero-content { padding: 92px 0 96px; }
  .premium-market-lock { grid-template-columns: 1fr; }
  .rail-track { grid-auto-columns: minmax(260px, 82vw); }
}
