/* HeyCharStars site: shared tokens, base typography, header and footer.
   Page-specific rules live in their own stylesheet (media-kit.css). */

:root {
  color-scheme: light;
  --ground: #f7f1f4;
  --surface: #ffffff;
  --surface-2: #fbf6f8;
  --ink: #241a26;
  --ink-2: #5a4d57;
  --muted: #8a7c85;
  --hairline: #e7dce2;
  --baseline: #cdbfc7;
  --accent: #c8386b;
  --accent-soft: #f3d7e2;
  --series-1: #c8386b;
  --series-1-soft: #e9a4bd;
  --series-2: #1a8fb0;
  --tip-bg: #241a26;
  --tip-ink: #ffffff;
  --shadow: 0 1px 2px rgba(36, 26, 38, 0.06), 0 12px 40px rgba(36, 26, 38, 0.08);
  --font-display: "Bricolage Grotesque", "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --header-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #120d14;
    --surface: #1d1620;
    --surface-2: #251c29;
    --ink: #f6edf2;
    --ink-2: #c9bac3;
    --muted: #9d8d97;
    --hairline: #34293a;
    --baseline: #4a3d50;
    --accent: #d94f80;
    --accent-soft: #4a2536;
    --series-1: #d94f80;
    --series-1-soft: #8a3a58;
    --series-2: #2aa3c4;
    --tip-bg: #f6edf2;
    --tip-ink: #241a26;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #120d14;
  --surface: #1d1620;
  --surface-2: #251c29;
  --ink: #f6edf2;
  --ink-2: #c9bac3;
  --muted: #9d8d97;
  --hairline: #34293a;
  --baseline: #4a3d50;
  --accent: #d94f80;
  --accent-soft: #4a2536;
  --series-1: #d94f80;
  --series-1-soft: #8a3a58;
  --series-2: #2aa3c4;
  --tip-bg: #f6edf2;
  --tip-ink: #241a26;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (max-width: 640px) { .wrap { padding: 0 12px; } }

/* YouTube mark used in the header and beside channel links */
.yt { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; flex: none; }

/* site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header { background: var(--ground); }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
}
.site-nav a {
  color: var(--ink-2);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.site-nav .btn { margin-left: 6px; }
@media (max-width: 720px) {
  .site-nav a.secondary { display: none; }
}
/* On narrow screens a header button that has an icon collapses to just the icon. */
@media (max-width: 520px) {
  .site-nav .btn svg + span { display: none; }
  .site-nav .btn:has(svg) { padding: 8px 10px; }
  .site-nav .btn svg { width: 16px; height: 16px; }
}
@media (max-width: 400px) {
  .brand { font-size: 15px; }
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { filter: brightness(0.94); }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn svg { width: 14px; height: 14px; flex: none; }

/* site footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 48px;
  padding: 28px 0 40px;
  font-size: 12.5px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--ink-2); }

@media print {
  :root { --ground: #ffffff; --shadow: none; }
  html { scroll-behavior: auto; }
  .site-header, .site-footer, .btn { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
