/* ============================================================
   sneg.dev — shared design system
   One stylesheet for the whole site. Pages may override the
   tokens below (accent, bg, fonts) but should reuse the
   components: header, nav, buttons, chips, footer, toasts.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #f4f2ec;
  --bg-2: #ecebe3;
  --surface: #fbfaf6;
  --surface-2: #f0eee7;
  --ink: #131316;
  --ink-2: #3c3c42;
  --muted: #75757e;
  --line: rgba(19, 19, 22, 0.16);
  --line-strong: rgba(19, 19, 22, 0.55);
  --accent: #2e7fd6;
  --accent-2: #1b5fa8;
  --accent-soft: rgba(46, 127, 214, 0.10);
  --on-accent: #ffffff;
  --ok: #1e9d55;
  --warn: #c9821a;
  --danger: #c84545;

  --font-display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --max: 1180px;
  --pad: clamp(1.15rem, 4vw, 4rem);
  --radius: 2px;
  --shadow: 0 18px 50px rgba(19, 19, 22, 0.08);
  --header-h: 58px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #131316;
  --bg-2: #1a1a1f;
  --surface: #191920;
  --surface-2: #202028;
  --ink: #f0ede5;
  --ink-2: #c3c1bb;
  --muted: #8b8b95;
  --line: rgba(240, 237, 229, 0.16);
  --line-strong: rgba(240, 237, 229, 0.5);
  --accent: #6aaff2;
  --accent-2: #9cc9f7;
  --accent-soft: rgba(106, 175, 242, 0.14);
  --on-accent: #0d1117;
  --ok: #4cc27f;
  --warn: #e0a53a;
  --danger: #e06767;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);

  color-scheme: dark;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

/* ---------- utilities ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.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;
}

.skip-link {
  position: fixed;
  top: 0.6rem; left: 0.6rem;
  z-index: 500;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--line);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand b { font-weight: 900; }
.brand .tm {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--accent);
  transform: translateY(-0.35em);
}
.brand__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.35rem;
  align-self: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.site-nav a {
  padding: 0.42rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1.5px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--line);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.4rem;
}

.lang-switch,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--line);
  padding: 2px;
}

.lang-switch button {
  padding: 0.3rem 0.48rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.theme-toggle {
  justify-content: center;
  width: 30px;
  height: 27px;
  color: var(--ink-2);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

.menu-btn {
  display: none;
  width: 32px; height: 30px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--line);
  color: var(--ink-2);
}

/* ---------- buttons / chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.05rem;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: background 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.18s ease;
  box-shadow: 3px 4px 0 var(--line-strong);
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  transform: translate(-1px, -2px) rotate(-0.5deg);
  box-shadow: 4px 6px 0 var(--line-strong);
}
.btn:active { transform: translateY(2px); box-shadow: 1px 1px 0 var(--line-strong); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-style: dashed;
}
.btn--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  border-style: solid;
  color: var(--bg);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn--accent:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.23rem 0.55rem;
  border: 1.5px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip--accent,
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chip--solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* live dot */
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  flex-shrink: 0;
}
.live-dot.online,
.live-dot.idle,
.live-dot.dnd { background: var(--ok); }
.live-dot.dnd { background: var(--warn); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
}
.card--ink { border-color: var(--ink); }

/* ---------- latest video ---------- */
.latest {
  display: grid;
  grid-template-columns: 168px 1fr auto;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
.latest:hover { transform: translateY(-2px); border-color: var(--accent); }
.latest__thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border-right: 1.5px solid var(--ink);
  min-height: 96px;
}
.latest__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.25);
  transition: filter 0.3s ease, transform 0.3s ease;
}
.latest:hover .latest__thumb img { filter: grayscale(0); transform: scale(1.03); }
.latest__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.12);
}
.latest__body {
  min-width: 0;
  padding: 0.85rem 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}
.latest__label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.latest__title {
  font-weight: 800;
  font-size: 0.94rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.latest__date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
}
.latest__cta {
  display: flex;
  align-items: center;
  padding: 0 1.2rem;
  border-left: 1.5px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.latest:hover .latest__cta { background: var(--accent); color: var(--on-accent); }

@media (max-width: 620px) {
  .latest { grid-template-columns: 110px 1fr; }
  .latest__cta {
    grid-column: 1 / -1;
    justify-content: center;
    padding: 0.7rem;
    border-left: 0;
    border-top: 1.5px solid var(--ink);
  }
}

/* ---------- link rows ---------- */
.link-list {
  border-top: 1.5px solid var(--ink);
}
.link-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.78rem 0.15rem;
  border-bottom: 1.5px solid var(--line);
  transition: padding-left 0.16s ease, color 0.16s ease,
              border-color 0.16s ease;
}
.link-row:hover {
  padding-left: 0.6rem;
  color: var(--accent);
  border-color: var(--accent);
}
.link-row__icon {
  width: 22px;
  text-align: center;
  color: var(--muted);
  transition: color 0.16s ease;
}
.link-row:hover .link-row__icon { color: var(--accent); }
.link-row__label { font-weight: 700; }
.link-row__sub {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
  text-align: right;
}
.link-row__arrow {
  font-size: 0.62rem;
  color: var(--muted);
  transform: translateX(-4px);
  opacity: 0;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.link-row:hover .link-row__arrow {
  transform: translateX(0);
  opacity: 1;
  color: var(--accent);
}
@media (max-width: 560px) {
  .link-row__sub { display: none; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1.5px solid var(--ink);
  padding-block: clamp(2.2rem, 6vw, 4rem);
  margin-top: clamp(2.5rem, 8vw, 6rem);
}
.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: flex-start;
  justify-content: space-between;
}
.site-footer__sign {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(1.5rem, 4.6vw, 2.6rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
}
.site-footer__note {
  margin-top: 0.6rem;
  max-width: 34ch;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-2);
}
.site-footer__links a {
  border-bottom: 1px dotted var(--line-strong);
  padding-bottom: 1px;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.site-footer__links a:hover { color: var(--accent); border-color: var(--accent); }
.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
}
.heart {
  display: inline-block;
  cursor: pointer;
  color: var(--accent);
  transition: transform 0.18s ease;
}
.heart:hover { transform: scale(1.25) rotate(-6deg); }

/* ---------- addendum ---------- */
.addendum {
  margin: clamp(1.5rem, 5vw, 3rem) auto 0;
  border: 1.5px solid var(--accent);
  background: var(--accent-soft);
  padding: clamp(1.1rem, 3vw, 2rem);
  animation: fade-in 0.35s ease both;
}
.addendum h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.addendum a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  transition: padding-left 0.16s ease, color 0.16s ease;
}
.addendum a:hover { padding-left: 0.6rem; color: var(--accent); }
.addendum a i { width: 20px; text-align: center; color: var(--accent); }

/* ---------- toasts ---------- */
.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(320px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast i { color: var(--accent); }

/* confetti particles (created by Sneg.confetti) */
.sneg-confetti {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  border-radius: 1px;
  will-change: transform, opacity;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- generic page bits ---------- */
.page-main { padding-top: clamp(1.6rem, 4vw, 3rem); }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: clamp(1rem, 3vw, 1.8rem);
  border-bottom: 1.5px solid var(--ink);
}
.page-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.page-lede {
  max-width: 48ch;
  color: var(--ink-2);
  font-size: clamp(0.92rem, 1.4vw, 1.02rem);
}

/* ---------- responsive header ---------- */
@media (max-width: 780px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--pad) 0.9rem;
    background: var(--bg);
    border-bottom: 1.5px solid var(--ink);
    margin-left: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.7rem 0.2rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.72rem;
  }
  .site-nav a[aria-current="page"] { border-color: var(--line); }
  .nav-actions { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .toast-container, .menu-btn { display: none !important; }
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
