/* yiteai.com design tokens */
:root{
  /* surfaces */
  --bg-0: #06080f;       /* deepest */
  --bg-1: #0a0e1a;       /* page */
  --bg-2: #0f1422;       /* cards */
  --bg-3: #161b2c;       /* elevated */
  --bg-4: #1c2238;       /* hover */
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.2);

  /* text — all pairs tested against --bg-1 (#0a0e1a) for WCAG AA */
  --fg-0: #f5f7ff;       /* primary — 16.2:1 */
  --fg-1: #c8cce0;       /* secondary — 10.3:1 */
  --fg-2: #8b91ad;       /* tertiary — 5.1:1 */
  --fg-3: #717899;       /* muted — 4.0:1 (raised from #5b6080 for contrast) */
  --fg-4: #4f5575;       /* faint — decorative only, not for body text */

  /* accents — cyan primary, violet secondary */
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-glow: rgba(34, 211, 238, 0.35);
  --accent-2-glow: rgba(167, 139, 250, 0.3);

  /* semantic */
  --success: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;

  /* radii */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --r-4: 20px;
  --r-pill: 999px;

  /* ── type scale (modular, 8 stops) ── */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Inter", -apple-system, sans-serif;

  --text-xs:  11px;    /* badges, captions, timestamps */
  --text-sm:  12px;    /* secondary labels, helper text */
  --text-md:  13px;    /* body text, descriptions */
  --text-base: 14px;   /* primary body, inputs */
  --text-lg:  16px;    /* subheadings, emphasized text */
  --text-xl:  18px;    /* section titles */
  --text-2xl: 22px;    /* page titles */
  --text-3xl: 28px;    /* hero headings */
  --text-4xl: 36px;    /* landing hero */

  --leading-tight: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* ── font weight scale ── */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 0 1px rgba(34,211,238,.35), 0 0 24px rgba(34,211,238,.25);
}

/* base reset for screen artboards */
.yt {
  font-family: var(--font-sans);
  color: var(--fg-0);
  background: var(--bg-1);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
.yt *, .yt *::before, .yt *::after { box-sizing: border-box; }
.yt button { font-family: inherit; cursor: pointer; }

/* utility — soft grid bg */
.yt-grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* utility — radial spotlight */
.yt-spot {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34,211,238,0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(167,139,250,0.10), transparent 60%);
}

/* gradient text */
.yt-grad-text {
  background: linear-gradient(135deg, #fff 0%, #c4f0f9 40%, #22d3ee 70%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* glass card */
.yt-glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
}


/* primary button */
.yt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--btn-radius, 10px);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
}
.yt-btn-primary {
  background: linear-gradient(180deg, #2dd9f4 0%, #22d3ee 50%, #1bb8d4 100%);
  color: #052028;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -1px 0 rgba(0,0,0,0.2) inset,
    0 6px 16px rgba(34,211,238,.25);
}
.yt-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.yt-btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--fg-0);
  border-color: var(--line-2);
}
.yt-btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--line-strong); }

/* input */
.yt-input {
  width: 100%;
  height: 40px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-2);
  border-radius: var(--input-radius, 10px);
  color: var(--fg-0);
  font: inherit;
  font-size: 14px;
  padding: 0 14px;
  outline: none;
  transition: all .15s ease;
}
.yt-input:focus {
  border-color: var(--accent);
  background: rgba(34,211,238,0.04);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
}
.yt-input::placeholder { color: var(--fg-3); }

/* chip */
.yt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-1);
  white-space: nowrap;
}
.yt-chip.is-active {
  background: rgba(34,211,238,0.12);
  border-color: rgba(34,211,238,0.4);
  color: #b3eef9;
}

/* scrollbar */
.yt ::-webkit-scrollbar { width: 8px; height: 8px; }
.yt ::-webkit-scrollbar-track { background: transparent; }
.yt ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.yt ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* divider */
.yt-divider { height: 1px; background: var(--line); }

/* badge */
.yt-badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: rgba(34,211,238,0.12);
  color: var(--accent);
  border: 1px solid rgba(34,211,238,0.25);
}
.yt-badge-violet {
  background: rgba(167,139,250,0.12);
  color: var(--accent-2);
  border-color: rgba(167,139,250,0.25);
}

/* ── spacing tokens ── */
:root {
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  /* common surface styles */
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --surface-active: rgba(255,255,255,0.08);
  --border: 1px solid var(--line-2);
}

/* ── skeleton loading ── */
@keyframes yt-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.yt-skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 37%, var(--bg-2) 63%);
  background-size: 800px 100%;
  animation: yt-shimmer 1.5s ease infinite;
  border-radius: var(--r-2);
}
.yt-skeleton-text { height: 14px; border-radius: 4px; margin-bottom: 8px; }
.yt-skeleton-text:last-child { width: 60%; }
.yt-skeleton-card {
  border-radius: var(--r-3);
  overflow: hidden;
  border: 1px solid var(--line);
}
.yt-skeleton-img { aspect-ratio: 4/3; }
.yt-skeleton-banner { aspect-ratio: 2.2/1; border-radius: var(--r-3); }

/* ── card ── */
.yt-card {
  border-radius: var(--r-3);
  border: 1px solid var(--line-2);
  background: var(--surface);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.yt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34,211,238,0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* ── clickable card (whole card is the action) ── */
.yt-clickcard {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.yt-clickcard[role="button"]:hover {
  transform: translateY(-2px);
  border-color: rgba(34,211,238,0.4) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.yt-clickcard[role="button"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.yt-clickcard[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (hover: none) {
  .yt-clickcard[role="button"]:hover { transform: none; box-shadow: none; }
}

/* ── image fallback ── */
.yt-img-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  color: var(--fg-4);
}

/* ── fade-in animation ── */
@keyframes yt-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.yt-fadein { animation: yt-fadein .3s ease; }

/* ── spinner ── */
.yt-spinner {
  width: 20px; height: 20px;
  border: 3px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── tag/filter pill ── */
.yt-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 14px;
  border-radius: var(--r-pill);
  border: none;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .12s ease;
  background: transparent;
  color: var(--fg-3);
}
.yt-pill:hover { background: var(--surface-hover); color: var(--fg-1); }
.yt-pill.is-active { background: var(--surface-active); color: var(--fg-0); font-weight: 600; }


/* ── typography utility classes ── */
.yt-text-xs  { font-size: var(--text-xs); line-height: var(--leading-tight); }
.yt-text-sm  { font-size: var(--text-sm); line-height: var(--leading-normal); }
.yt-text-md  { font-size: var(--text-md); line-height: var(--leading-normal); }
.yt-text-base { font-size: var(--text-base); line-height: var(--leading-normal); }
.yt-text-lg  { font-size: var(--text-lg); line-height: var(--leading-tight); }
.yt-text-xl  { font-size: var(--text-xl); line-height: var(--leading-tight); }
.yt-text-2xl { font-size: var(--text-2xl); line-height: var(--leading-tight); }
.yt-text-3xl { font-size: var(--text-3xl); line-height: 1.15; }

.yt-text-muted { color: var(--fg-3); }
.yt-text-secondary { color: var(--fg-2); }
.yt-text-primary { color: var(--fg-0); }
.yt-text-accent { color: var(--accent); }
.yt-text-mono { font-family: var(--font-mono); }
.yt-text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── responsive density: fill content at all resolutions ── */
@media (min-width: 1600px) {
  :root {
    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 14px;
    --text-base: 15px;
    --text-lg: 17px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
  }
}
@media (min-width: 2560px) {
  :root {
    --text-xs: 13px;
    --text-sm: 14px;
    --text-md: 15px;
    --text-base: 16px;
    --text-lg: 19px;
    --text-xl: 23px;
    --text-2xl: 28px;
    --text-3xl: 36px;
  }
}
@media (min-width: 3840px) {
  :root {
    --text-xs: 14px;
    --text-sm: 16px;
    --text-md: 17px;
    --text-base: 18px;
    --text-lg: 21px;
    --text-xl: 26px;
    --text-2xl: 32px;
    --text-3xl: 42px;
  }
}
@media (max-width: 768px) {
  :root {
    --text-xs: 11px;   /* min 11px for readability */
    --text-sm: 12px;
    --text-md: 13px;
    --text-base: 14px; /* keep 14px minimum for inputs (iOS auto-zoom at <16px) */
    --text-lg: 15px;
    --text-xl: 17px;
    --text-2xl: 20px;
    --text-3xl: 24px;
  }
}


/* ── masonry (CSS columns, natural image height) ── */
.yt-masonry {
  column-count: 5;
  column-gap: 4px;
}
@media (min-width: 1600px) { .yt-masonry { column-count: 6; } }
@media (min-width: 2560px) { .yt-masonry { column-count: 8; column-gap: 6px; } }
@media (min-width: 3840px) { .yt-masonry { column-count: 10; column-gap: 8px; } }
@media (max-width: 1200px)  { .yt-masonry { column-count: 4; } }
@media (max-width: 900px)   { .yt-masonry { column-count: 3; } }
@media (max-width: 640px)   {
  .yt-masonry {
    column-count: unset;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .yt-masonry > * {
    max-height: 280px;
  }
  .yt-masonry > * img,
  .yt-masonry > * video {
    max-height: 280px;
  }
}



/* ── z-index scale ── */
:root {
  --z-rail: 40;
  --z-topnav: 50;
  --z-dropdown: 80;
  --z-bottom-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .yt-fadein { animation: none; }
  .yt-skeleton { animation: none; }
  .yt-spinner { animation-duration: 1.5s; }
  .yt-card:hover { transform: none; }
  .yt-btn-primary:hover { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* logo dot */
.yt-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.02em;
  color: var(--fg-0);
}
.yt-logo-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 30%, #5eead4, #22d3ee 40%, #6366f1 100%);
  box-shadow: 0 0 0 1px rgba(34,211,238,.4), 0 0 12px rgba(34,211,238,.4);
  position: relative;
}
.yt-logo-mark::after {
  content: '';
  position: absolute; inset: 5px;
  border-radius: 3px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
}
