/*
 * Shared identity for every page: the story's wave mark, royal blue, amber highlight,
 * night-sky navy and the original typefaces. Everything is prefixed `uc-` so it can sit
 * on top of the Webflow export without colliding with generated class names.
 */
@font-face {
  font-family: 'UC Venus';
  src: url('../fonts/venus-rising-rg.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'UC Nasalization';
  src: url('../fonts/nasalization-rg.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'UC Gothic';
  src: url('../fonts/CenturyGothic.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'UC Gothic';
  src: url('../fonts/GOTHICB0.TTF') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'UC Morbodoni';
  src: url('../fonts/Morbodoni-Trial.ttf') format('truetype');
  font-display: swap;
  /* The trial release draws a watermark instead of digits and @: let them fall back. */
  unicode-range: U+0000-002F, U+003A-003F, U+0041-10FFFF;
}

:root {
  --uc-night: #080a1f;
  --uc-deep: #10122e;
  --uc-panel: #171a3f;
  --uc-panel-2: #20245a;
  --uc-wave: #4150f0;
  --uc-wave-bright: #7482ff;
  --uc-amber: #fbb454;
  --uc-sun: #ffd460;
  --uc-cream: #ffe19c;
  --uc-mint: #5fe0b0;
  --uc-rose: #ff7a8a;
  --uc-ink: #f2f3ff;
  --uc-soft: #c4c8ea;
  --uc-muted: #8f95c4;
  --uc-line: rgba(196, 200, 234, 0.16);
  --uc-line-strong: rgba(196, 200, 234, 0.32);
  --uc-font-display: 'UC Venus', 'UC Nasalization', 'UC Gothic', sans-serif;
  --uc-font-ui: 'UC Nasalization', 'UC Gothic', sans-serif;
  --uc-font-body: 'UC Gothic', 'Century Gothic', 'Avenir Next', 'Segoe UI', sans-serif;
  --uc-font-serif: 'UC Morbodoni', 'Didot', 'Bodoni 72', Georgia, serif;
  --uc-bar-h: 64px;
  --uc-crumb-h: 0px;
  --uc-radius: 14px;
  --uc-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Top bar ---------- */
.uc-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100000;
  font-family: var(--uc-font-body);
  color: var(--uc-ink);
  background: linear-gradient(180deg, rgba(8, 10, 31, 0.92), rgba(8, 10, 31, 0.8));
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--uc-line);
  transition: transform 0.35s var(--uc-ease);
}
.uc-bar *,
.uc-bar *::before,
.uc-bar *::after {
  box-sizing: border-box;
}
.uc-bar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--uc-bar-h);
  padding: 0 clamp(16px, 2.4vw, 32px);
  max-width: 1680px;
  margin: 0 auto;
}
.uc-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  color: var(--uc-ink);
  text-decoration: none;
  border-radius: 10px;
  padding: 4px 6px 4px 0;
}
.uc-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(65, 80, 240, 0.28);
  transition: transform 0.6s var(--uc-ease);
}
.uc-brand:hover img {
  transform: rotate(-14deg) scale(1.06);
}
.uc-brand__word {
  display: grid;
  font-family: var(--uc-font-display);
  font-size: 10.5px;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.uc-brand__word span:last-child {
  color: var(--uc-amber);
}

/* Breadcrumb: the thesis places it top-left, updating in real time as you scroll. */
.uc-crumbs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding-left: 18px;
  border-left: 1px solid var(--uc-line);
  height: 30px;
}
.uc-crumbs ol {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  font-size: 13px;
  line-height: 1;
}
.uc-crumbs li {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 1;
}
.uc-crumbs li:last-child {
  flex-shrink: 0;
  max-width: 100%;
}
.uc-crumbs li + li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin: 0 9px 0 5px;
  border-top: 1.5px solid var(--uc-muted);
  border-right: 1.5px solid var(--uc-muted);
  transform: rotate(45deg);
}
.uc-crumbs a,
.uc-crumbs span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--uc-soft);
  text-decoration: none;
  padding: 7px 6px;
  border-radius: 7px;
}
.uc-crumbs a:hover {
  color: var(--uc-ink);
  background: rgba(255, 255, 255, 0.07);
}
.uc-crumbs [aria-current] {
  color: var(--uc-amber);
  font-weight: 700;
}
.uc-crumbs__empty {
  color: var(--uc-muted);
}

.uc-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-family: var(--uc-font-ui);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.uc-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  color: var(--uc-soft);
  text-decoration: none;
  border-radius: 999px;
  transition:
    color 0.2s,
    background 0.2s;
}
.uc-nav a:hover {
  color: var(--uc-ink);
  background: rgba(255, 255, 255, 0.08);
}
.uc-nav a[aria-current='page'] {
  color: var(--uc-ink);
}
.uc-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--uc-amber);
}
.uc-nav .uc-journey {
  margin-left: 8px;
  color: var(--uc-night);
  background: var(--uc-amber);
  font-weight: 700;
}
.uc-nav .uc-journey:hover {
  color: var(--uc-night);
  background: var(--uc-sun);
}
.uc-nav .uc-journey[aria-current='page']::after {
  display: none;
}
.uc-xp {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--uc-night);
  color: var(--uc-sun);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.uc-menu {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  margin-left: auto;
  border: 1px solid var(--uc-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--uc-ink);
  font: 12px/1 var(--uc-font-ui);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.uc-menu__icon {
  position: relative;
  width: 18px;
  height: 12px;
}
.uc-menu__icon::before,
.uc-menu__icon::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.3s var(--uc-ease),
    top 0.3s var(--uc-ease);
}
.uc-menu__icon::before {
  top: 1px;
}
.uc-menu__icon::after {
  top: 9px;
}
.uc-menu[aria-expanded='true'] .uc-menu__icon::before {
  top: 5px;
  transform: rotate(45deg);
}
.uc-menu[aria-expanded='true'] .uc-menu__icon::after {
  top: 5px;
  transform: rotate(-45deg);
}

.uc-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  pointer-events: none;
}
.uc-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--uc-progress, 0));
  background: linear-gradient(90deg, var(--uc-wave-bright), var(--uc-amber) 60%, var(--uc-sun));
  box-shadow: 0 0 12px rgba(251, 180, 84, 0.6);
}

.uc-bar :focus-visible,
.uc-toasts :focus-visible,
.uc-footer :focus-visible {
  outline: 3px solid var(--uc-cream);
  outline-offset: 3px;
}

.uc-skip {
  position: fixed;
  left: 12px;
  top: -120px;
  z-index: 100002;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--uc-cream);
  color: var(--uc-night);
  font: 700 15px/1.3 var(--uc-font-body);
  text-decoration: none;
}
.uc-skip:focus {
  top: 12px;
}

@media (max-width: 1180px) {
  .uc-nav {
    position: fixed;
    top: var(--uc-bar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100dvh - var(--uc-bar-h));
    overflow: auto;
    padding: 12px clamp(16px, 4vw, 32px) 28px;
    background: rgba(8, 10, 31, 0.97);
    border-bottom: 1px solid var(--uc-line);
    font-size: 16px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 0.25s var(--uc-ease),
      transform 0.25s var(--uc-ease),
      visibility 0s 0.25s;
  }
  .uc-bar.is-open .uc-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 0.25s var(--uc-ease),
      transform 0.25s var(--uc-ease);
  }
  .uc-nav a {
    min-height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    justify-content: space-between;
  }
  .uc-nav a[aria-current='page'] {
    background: rgba(255, 255, 255, 0.06);
  }
  .uc-nav a[aria-current='page']::after {
    left: 0;
    right: auto;
    top: 14px;
    bottom: 14px;
    width: 3px;
    height: auto;
  }
  .uc-nav .uc-journey {
    margin: 8px 0 0;
  }
  .uc-menu {
    display: inline-flex;
  }
  .uc-crumbs {
    padding-left: 14px;
  }
}

@media (max-width: 720px) {
  :root {
    --uc-bar-h: 56px;
    --uc-crumb-h: 38px;
  }
  .uc-bar__inner {
    flex-wrap: wrap;
    height: auto;
    gap: 0 12px;
    padding: 0 16px;
  }
  .uc-brand {
    height: var(--uc-bar-h);
  }
  .uc-brand img {
    width: 30px;
    height: 30px;
  }
  .uc-crumbs {
    order: 3;
    flex: none;
    width: calc(100% + 32px);
    height: var(--uc-crumb-h);
    margin: 0 -16px;
    padding: 0 10px;
    border-left: 0;
    border-top: 1px solid var(--uc-line);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .uc-crumbs::-webkit-scrollbar {
    display: none;
  }
  .uc-crumbs ol {
    overflow: visible;
    font-size: 12.5px;
  }
  .uc-crumbs li {
    flex-shrink: 0;
  }
  .uc-crumbs a,
  .uc-crumbs span {
    max-width: 62vw;
  }
  .uc-nav {
    top: calc(var(--uc-bar-h) + var(--uc-crumb-h));
    max-height: calc(100dvh - var(--uc-bar-h) - var(--uc-crumb-h));
  }
  .uc-bar:not(.has-crumbs) {
    --uc-crumb-h: 0px;
  }
  .uc-bar:not(.has-crumbs) .uc-crumbs {
    display: none;
  }
}
@media (max-width: 380px) {
  .uc-brand__word {
    font-size: 9px;
  }
  .uc-menu {
    padding: 0 12px;
  }
  .uc-menu__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Toasts (badges, XP) ---------- */
.uc-toasts {
  position: fixed;
  right: clamp(12px, 2vw, 28px);
  bottom: clamp(12px, 2vw, 28px);
  z-index: 100003;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 24px));
  font-family: var(--uc-font-body);
  pointer-events: none;
}
.uc-toast {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--uc-ink);
  background: linear-gradient(135deg, rgba(32, 36, 90, 0.97), rgba(16, 18, 46, 0.97));
  border: 1px solid rgba(251, 180, 84, 0.45);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  pointer-events: auto;
  animation: uc-toast-in 0.55s var(--uc-ease) both;
}
.uc-toast.is-leaving {
  animation: uc-toast-out 0.4s var(--uc-ease) both;
}
.uc-toast__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--uc-sun), var(--uc-amber) 60%, #c97a1f);
  box-shadow: 0 0 22px rgba(251, 180, 84, 0.55);
}
.uc-toast__kicker {
  font: 10.5px/1.2 var(--uc-font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--uc-amber);
}
.uc-toast__title {
  display: block;
  margin-top: 3px;
  font-weight: 700;
  font-size: 16px;
}
.uc-toast__text {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--uc-soft);
}
.uc-toast--xp {
  grid-template-columns: auto 1fr;
  padding: 10px 16px;
  border-color: rgba(116, 130, 255, 0.5);
}
.uc-toast--xp .uc-toast__icon {
  width: auto;
  height: auto;
  padding: 6px 10px;
  border-radius: 999px;
  font: 13px/1 var(--uc-font-ui);
  color: var(--uc-night);
  background: var(--uc-sun);
  box-shadow: none;
}
@keyframes uc-toast-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
}
@keyframes uc-toast-out {
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* ---------- Footer ---------- */
.uc-footer {
  position: relative;
  z-index: 2;
  padding: 0;
  text-align: left;
  font-family: var(--uc-font-body);
  color: var(--uc-soft);
  background:
    radial-gradient(ellipse 60% 120% at 12% 0%, rgba(65, 80, 240, 0.28), transparent 70%),
    var(--uc-night);
  border-top: 1px solid var(--uc-line);
}
.uc-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px clamp(20px, 5vw, 64px) 40px;
}
.uc-footer .uc-brand {
  margin-bottom: 18px;
}
.uc-footer p {
  margin: 0 0 10px;
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.7;
}
.uc-footer h2 {
  margin: 0 0 14px;
  font: 11px/1.2 var(--uc-font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--uc-amber);
}
.uc-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.uc-footer li + li {
  margin-top: 8px;
}
.uc-footer a {
  margin: 0;
  color: var(--uc-ink);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--uc-line-strong);
}
.uc-footer a:hover {
  border-color: var(--uc-amber);
}
.uc-footer .uc-brand {
  border: 0;
}
.uc-footer .uc-footer__base {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px clamp(20px, 5vw, 64px) 28px;
  border-top: 1px solid var(--uc-line);
  font-size: 12.5px;
  color: var(--uc-muted);
}
@media (max-width: 820px) {
  .uc-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .uc-footer__inner > :first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 460px) {
  .uc-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---------- Profile step (after the diagnostic quiz) ---------- */
.profile-step {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--uc-line-strong);
  background: rgba(8, 10, 31, 0.45);
  font-family: var(--uc-font-body);
  color: var(--uc-ink);
  text-align: left;
}
.profile-step__title {
  margin: 0;
  font: 400 26px/1.2 var(--uc-font-serif);
  color: #fff;
}
.profile-step__text {
  margin: 0;
  font-size: 15px;
  color: var(--uc-soft);
}
.profile-step__group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.profile-step__group legend {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 15px;
}
.profile-step__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-step__chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--uc-line-strong);
  font-size: 14px;
  cursor: pointer;
}
.profile-step .profile-step__chip input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
  appearance: none;
}
.profile-step .profile-step__chip span {
  color: var(--uc-ink);
  font: 14px/1.2 var(--uc-font-body);
}
.profile-step__chip:has(input:checked) {
  border-color: var(--uc-amber);
  background: rgba(251, 180, 84, 0.16);
}
.profile-step__chip:has(input:checked)::before {
  content: '✓';
  color: var(--uc-amber);
  font-weight: 700;
}
.profile-step__chip:has(input:focus-visible) {
  outline: 3px solid var(--uc-cream);
  outline-offset: 3px;
}
.profile-step__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-step__save,
.profile-step__skip {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font: 13px/1 var(--uc-font-ui);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.profile-step__save {
  border: 0;
  background: var(--uc-amber);
  color: var(--uc-night);
}
.profile-step__skip {
  border: 1px solid var(--uc-line-strong);
  background: transparent;
  color: var(--uc-ink);
}
.profile-step__status {
  margin: 0;
  font-size: 14px;
  color: var(--uc-mint);
}
.profile-step__status a {
  color: var(--uc-cream);
}
