/* Vaganti University: Studio (lab/04-pms/podpad/design/studio.css), as vaganti.com wears it (lab/06-ota), for
   learners. Dark, frosted panels over a night gradient that takes the colors of the topic in view. The admin
   (admin/admin.css) builds on these tokens and parts.

   1. Tokens: the palette, the topics' colors, type
   2. The window: background, header, footer
   3. Parts: cards, covers, grids, rows, chips, buttons, fields, badges, meters, sheets, toasts
   4. Pages (portal): home, browse, a course, the course home, the player, programs, my learning, jobs, profiles
   5. Phone, motion */

/* ------------------------------------------------------------ 1. tokens */

@property --s1 { syntax: '<color>'; inherits: true; initial-value: #4f8bff; }
@property --s2 { syntax: '<color>'; inherits: true; initial-value: #8a4dff; }
@property --s3 { syntax: '<color>'; inherits: true; initial-value: #110f3b; }

:root {
  --ds-glass: rgba(255, 255, 255, 0.055);
  --ds-glass-2: rgba(255, 255, 255, 0.09);
  --ds-glass-hover: rgba(255, 255, 255, 0.12);
  --ds-panel: rgba(16, 14, 34, 0.62);
  --ds-sheet: rgba(24, 21, 46, 0.97);
  --ds-line: rgba(255, 255, 255, 0.08);
  --ds-line-2: rgba(255, 255, 255, 0.14);
  --ds-text: #f3f1fb;
  --ds-text-2: rgba(255, 255, 255, 0.64);
  --ds-text-3: rgba(255, 255, 255, 0.42);
  --ds-accent: #8b97ff;
  --ds-green: #3ddc84;
  --ds-blue: #5ab0ff;
  --ds-orange: #ffad42;
  --ds-red: #ff6b6b;
  --ds-violet: #b98cff;
  --ds-gray: #9aa3b5;
  --ds-radius: 20px;
  --ds-radius-sm: 12px;
  --ds-blur: blur(28px) saturate(150%);
  --ds-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --ds-display: "Bruno Ace", var(--ds-font);
  --ds-read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ds-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ds-face: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  --ds-raised: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --page: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  --ion-font-family: var(--ds-font);
  --ion-background-color: #0b0a1c;
  --ion-background-color-rgb: 11, 10, 28;
  --ion-text-color: var(--ds-text);
  --ion-text-color-rgb: 243, 241, 251;
  --ion-toolbar-background: transparent;
  --ion-item-background: transparent;
  --ion-border-color: var(--ds-line);
  --ion-color-primary: #8b97ff;
  --ion-color-primary-rgb: 139, 151, 255;
  --ion-color-primary-contrast: #0e0c1f;

  color-scheme: dark;
  --g1: #4f8bff; --g2: #8a4dff; --g3: #110f3b;
  --s1: var(--g1); --s2: var(--g2); --s3: var(--g3);
  transition: --s1 0.9s var(--ds-ease), --s2 0.9s var(--ds-ease), --s3 0.9s var(--ds-ease);
}

/* The topics (schema/tenant/has/university: topics). A page about a course takes its topic's colors; cards set
   data-topic on themselves so their covers do too. */
[data-topic="service"] { --g1: #ff8a5c; --g2: #ff4d8d; --g3: #2c0d1c; }
[data-topic="safety"] { --g1: #34d67f; --g2: #149bd0; --g3: #052a22; }
[data-topic="front-office"] { --g1: #5ab0ff; --g2: #6a5cff; --g3: #081a3a; }
[data-topic="housekeeping"] { --g1: #4fd1c5; --g2: #2f80ff; --g3: #05263a; }
[data-topic="bar"] { --g1: #c86dff; --g2: #ff5fa2; --g3: #230a3a; }
[data-topic="fnb"] { --g1: #ffa53a; --g2: #ff4d6d; --g3: #2c1108; }
[data-topic="revenue"] { --g1: #f5c84b; --g2: #3ddc84; --g3: #1f1d06; }
[data-topic="leadership"] { --g1: #8b97ff; --g2: #d36dff; --g3: #140f3b; }
[data-topic="events"] { --g1: #ff5aa8; --g2: #9b4dff; --g3: #2a0b33; }
[data-topic="sustainability"] { --g1: #7ee36b; --g2: #1cc8a0; --g3: #082a12; }
[data-topic="jobs"] { --g1: #36c2ff; --g2: #3ddc84; --g3: #04223a; }

/* ------------------------------------------------------------ 2. the window */

body, ion-app {
  background:
    radial-gradient(70rem 48rem at 92% -12%, color-mix(in oklab, var(--s1) 42%, transparent), transparent 62%),
    radial-gradient(56rem 44rem at -8% 108%, color-mix(in oklab, var(--s2) 34%, transparent), transparent 60%),
    linear-gradient(165deg, var(--s3) 0%, #07060f 100%);
  background-attachment: fixed;
  color: var(--ds-text);
  font-family: var(--ds-font);
  -webkit-font-smoothing: antialiased;
}
ion-content { --background: transparent; --padding-bottom: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }

#top { background: transparent; box-shadow: none; }
#top::after { display: none; }
#top ion-toolbar {
  --background: rgba(10, 9, 24, 0.42); --border-color: var(--ds-line); --min-height: 60px;
  --padding-start: var(--gutter); --padding-end: var(--gutter);
  -webkit-backdrop-filter: var(--ds-blur); backdrop-filter: var(--ds-blur);
  padding-top: env(safe-area-inset-top);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.wordmark {
  display: block; width: 84px; aspect-ratio: 628 / 456; background: #fff;
  -webkit-mask: url(/wordmark.svg) center / contain no-repeat; mask: url(/wordmark.svg) center / contain no-repeat; margin: -6px 0;
}
.brand .uni { font-family: var(--ds-display); font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ds-text-2); padding-left: 10px; border-left: 1px solid var(--ds-line-2); }
.wordmark.small { width: 76px; margin: 0; opacity: 0.6; }
#nav { display: flex; gap: 4px; align-items: center; }
#nav a, #nav button.who {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 0; background: none; font: inherit;
  color: var(--ds-text-2); font-size: 0.92rem; font-weight: 550; transition: background 0.2s, color 0.2s; cursor: pointer;
}
#nav a:hover, #nav button.who:hover { color: var(--ds-text); background: var(--ds-glass); }
#nav a.on { color: var(--ds-text); background: var(--ds-glass-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
#nav ion-icon { font-size: 1.05rem; }
#nav .xr { color: #0b0a1c; background: linear-gradient(135deg, #fff, color-mix(in oklab, var(--s1) 45%, #fff)); }
#nav [hidden] { display: none; }
#nav .lang { font-family: var(--ds-display); font-size: 0.72rem; letter-spacing: 0.12em; padding: 8px 10px; border: 1px solid var(--ds-line-2); }

#page { min-height: 70vh; padding-bottom: 80px; }
.wrap, #page > section:not(.hero, .cover-hero, .full), #page > .grid, #page > .empty { max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
#page > section.full { padding: 0; }
.foot {
  max-width: var(--page); margin: 0 auto; padding: 32px var(--gutter) calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ds-line); display: flex; gap: 24px; align-items: center; color: var(--ds-text-3); font-size: 0.85rem; flex-wrap: wrap;
}
.foot a:hover { color: var(--ds-text); }
.foot nav { display: flex; gap: 16px; margin-left: auto; }

/* ------------------------------------------------------------ 3. parts */

.eyebrow { font-family: var(--ds-display); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ds-text-2); margin-bottom: 12px; }
.muted { color: var(--ds-text-2); }
.faint { color: var(--ds-text-3); }
.num { font-variant-numeric: tabular-nums; }

.card {
  position: relative; border-radius: var(--ds-radius); background: var(--ds-glass); border: 1px solid var(--ds-line);
  overflow: hidden; transition: transform 0.35s var(--ds-ease), background 0.2s, border-color 0.2s;
}
a.card:hover, .card.link:hover { transform: translateY(-3px); background: var(--ds-glass-hover); border-color: var(--ds-line-2); }
.panel h3 { margin-bottom: 8px; }
.panel > p.muted, .panel > p.note { font-size: 0.9rem; line-height: 1.5; margin-bottom: 10px; }
.panel {
  border-radius: 24px; background: var(--ds-panel); border: 1px solid var(--ds-line); padding: clamp(16px, 2.4vw, 24px);
  -webkit-backdrop-filter: var(--ds-blur); backdrop-filter: var(--ds-blur); box-shadow: var(--ds-raised);
}
/* A course's cover: no photo, its topic's light on a faint grid, its initials as the mark. */
.cover {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(circle at 25% 15%, color-mix(in oklab, var(--g1) 75%, transparent), transparent 62%),
    radial-gradient(circle at 90% 100%, color-mix(in oklab, var(--g2) 70%, transparent), transparent 60%),
    linear-gradient(145deg, var(--g3), #07060f);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .mono { font-family: var(--ds-display); font-size: clamp(2rem, 5vw, 3rem); color: rgba(255, 255, 255, 0.88); text-shadow: 0 0 30px var(--g1); letter-spacing: 0.04em; }
.cover ion-icon.glyph { position: absolute; right: 12px; bottom: 10px; font-size: 1.4rem; color: rgba(255, 255, 255, 0.7); }
.cover .tag, .tag {
  position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.02em;
  background: rgba(10, 9, 24, 0.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.16);
}
.meta { padding: 12px 14px 14px; display: grid; gap: 4px; }
.meta .by { display: flex; align-items: center; gap: 8px; color: var(--ds-text-2); font-size: 0.8rem; }
.meta h3 { font-size: 1rem; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta .line { color: var(--ds-text-2); font-size: 0.82rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stars { color: #ffd166; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.stars small { color: var(--ds-text-3); font-weight: 500; }
.logo {
  flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 0.62rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 260) 80% 62%), hsl(calc(var(--h, 260) + 40) 80% 45%));
}
.logo.big { width: 64px; height: 64px; border-radius: 18px; font-size: 1.3rem; }
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 220) 70% 58%), hsl(calc(var(--h, 220) + 50) 70% 42%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.avatar.big { width: 112px; height: 112px; font-size: 2.2rem; border: 4px solid #0b0a1c; }
.avatar.small { width: 26px; height: 26px; font-size: 0.62rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 280px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px; scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
.shelf { margin-top: 44px; }
.shelf > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.shelf h2 { font-size: 1.45rem; }
.shelf > header p { color: var(--ds-text-2); font-size: 0.92rem; margin-top: 4px; }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--ds-text-2); font-size: 0.9rem; white-space: nowrap; }
.more:hover { color: var(--ds-text); }
.empty { color: var(--ds-text-2); padding: 40px 0; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 0.86rem;
  color: var(--ds-text-2); background: var(--ds-glass); border: 1px solid var(--ds-line); cursor: pointer; transition: all 0.2s;
}
.chip:hover { color: var(--ds-text); background: var(--ds-glass-hover); }
.chip.on { color: #0b0a1c; background: #fff; border-color: #fff; font-weight: 600; }
.chip.static { cursor: default; }
.chip.static:hover { color: var(--ds-text-2); background: var(--ds-glass); }

button.primary, a.primary, button.secondary, a.secondary, button.ghost, a.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 650; font-size: 0.95rem; cursor: pointer; border: 1px solid var(--ds-line-2);
  color: var(--ds-text); background: var(--ds-face); box-shadow: var(--ds-raised); transition: transform 0.2s var(--ds-ease), background 0.2s; white-space: nowrap;
}
button.primary, a.primary { color: #0b0a1c; border-color: transparent; background: linear-gradient(135deg, #fff, color-mix(in oklab, var(--s1) 45%, #fff)); box-shadow: 0 10px 30px -10px var(--s1); }
button.ghost, a.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ds-text-2); }
button.ghost:hover, a.ghost:hover { color: var(--ds-text); background: var(--ds-glass); }
button.danger { color: var(--ds-red); }
button.small, a.small { padding: 8px 14px; font-size: 0.85rem; }
button:hover:not(:disabled), a.primary:hover, a.secondary:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.wide { width: 100%; }
button.icon, a.icon {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--ds-line);
  background: var(--ds-glass); color: var(--ds-text-2); cursor: pointer; font-size: 1rem; flex: none;
}
button.icon:hover:not(:disabled), a.icon:hover { color: var(--ds-text); background: var(--ds-glass-hover); }

.field { display: grid; gap: 6px; font-size: 0.85rem; color: var(--ds-text-2); }
.field > span { font-weight: 600; }
input.in, select.in, textarea.in, .search input {
  font: inherit; font-size: 0.95rem; color: var(--ds-text); background: rgba(0, 0, 0, 0.32); border: 1px solid var(--ds-line); border-radius: 12px;
  padding: 10px 12px; color-scheme: dark; width: 100%; box-sizing: border-box; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
textarea.in { min-height: 90px; resize: vertical; line-height: 1.5; }
input.in:focus, select.in:focus, textarea.in:focus, .search input:focus { outline: none; border-color: color-mix(in oklab, var(--s1) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--s1) 22%, transparent); }
.search { position: relative; display: flex; align-items: center; }
.search ion-icon { position: absolute; left: 14px; color: var(--ds-text-3); font-size: 1.1rem; pointer-events: none; }
.search input { padding: 12px 14px 12px 42px; border-radius: 999px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  background: color-mix(in oklab, var(--c, var(--ds-gray)) 18%, transparent); color: color-mix(in oklab, var(--c, var(--ds-gray)) 70%, #fff);
  border: 1px solid color-mix(in oklab, var(--c, var(--ds-gray)) 35%, transparent); white-space: nowrap;
}
.badge.green { --c: var(--ds-green); } .badge.blue { --c: var(--ds-blue); } .badge.orange { --c: var(--ds-orange); }
.badge.red { --c: var(--ds-red); } .badge.violet { --c: var(--ds-violet); } .badge.gray { --c: var(--ds-gray); }
/* Verified: the university issued it. The one mark employers learn to look for. */
.verified { --c: var(--ds-green); }
.verified ion-icon { font-size: 0.9rem; }

.meter { height: 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--g1), var(--g2)); box-shadow: 0 0 10px color-mix(in oklab, var(--g1) 60%, transparent); }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 0.95rem;
  background: radial-gradient(closest-side, #120f2a 78%, transparent 80% 100%), conic-gradient(var(--g1) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); }

dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 0; }
dl.facts div { padding: 14px; border-radius: 16px; background: var(--ds-glass); border: 1px solid var(--ds-line); }
dl.facts dt { color: var(--ds-text-3); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 650; }
dl.facts dd { margin: 4px 0 0; font-weight: 650; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ds-line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 12px 14px; color: var(--ds-text-2); font: inherit; font-weight: 600; font-size: 0.92rem; border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on, .tabs button.on { color: var(--ds-text); border-bottom-color: var(--s1); }

/* Sheets: a dialog in the page's glass. */
.sheet-back { position: fixed; inset: 0; z-index: 1000; background: rgba(4, 3, 12, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade 0.2s both; }
.sheet {
  width: min(560px, 100%); max-height: calc(100svh - 32px); overflow: auto; border-radius: 28px; background: var(--ds-sheet); border: 1px solid var(--ds-line-2);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1); padding: clamp(20px, 3vw, 30px); display: grid; gap: 16px; animation: rise 0.35s var(--ds-ease) both;
}
.sheet.wide { width: min(860px, 100%); }
.sheet > header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.sheet h2 { font-size: 1.4rem; }
.sheet .actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.toast {
  position: fixed; z-index: 1100; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: 16px; background: rgba(24, 21, 46, 0.96); border: 1px solid var(--ds-line-2); box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.7);
  display: flex; gap: 10px; align-items: center; font-size: 0.92rem; animation: drop 0.35s var(--ds-ease) both;
}
.toast ion-icon { color: var(--ds-green); font-size: 1.2rem; }
.toast.error ion-icon { color: var(--ds-red); }
.toast.earned { border-color: color-mix(in oklab, var(--ds-green) 50%, transparent); box-shadow: 0 0 60px -10px var(--ds-green); }

table.list { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.list th { text-align: left; color: var(--ds-text-3); font-weight: 650; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 10px 12px; border-bottom: 1px solid var(--ds-line); }
table.list td { padding: 12px; border-bottom: 1px solid var(--ds-line); vertical-align: middle; }
table.list tr.link { cursor: pointer; }
table.list tr.link:hover td { background: var(--ds-glass); }

/* ------------------------------------------------------------ 5. phone, motion */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pulse { 50% { transform: scale(1.4); opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
