/* TG Studios — tgstudios.app
   Light and dark, system-following. No JavaScript anywhere on this site. */

:root {
  --bg: #fdfdfc;
  --fg: #1a1a18;
  --muted: #4a4a45;
  --rule: #d9d9d2;
  --accent: #8a3a12;
  --accent-fg: #ffffff;
  --panel: #f2f1ec;
  --hear-bg: #eef3f7;
  --hear-rule: #2f5d7c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --fg: #ececea;
    --muted: #b3b3ad;
    --rule: #35363b;
    --accent: #ff9e6b;
    --accent-fg: #16171a;
    --panel: #1e2024;
    --hear-bg: #1b242c;
    --hear-rule: #6fb3dd;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 Georgia, "Iowan Old Style", "Times New Roman", serif;
}

/* ------------------------------------------------------------ skip link */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.75rem 1.25rem;
  z-index: 10;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------------- header */

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
}

.brand {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand a { color: inherit; text-decoration: none; }
.brand a:hover { text-decoration: underline; }

.site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.site-header nav a:hover { color: var(--fg); text-decoration: underline; }
.site-header nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

/* ----------------------------------------------------------------- main */

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1, h2, h3, h4 {
  line-height: 1.22;
  font-weight: 700;
  margin: 2.25rem 0 0.75rem;
  text-wrap: balance;
}
h1 { font-size: 2rem; margin-top: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p, ul, ol { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 700; }

code {
  font-family: "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  font-size: 0.9em;
  background: var(--panel);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* --------------------------------------------------------------- blocks */

.note {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}
.note > :last-child { margin-bottom: 0; }

.hear {
  background: var(--hear-bg);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--hear-rule);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}
.hear > :last-child { margin-bottom: 0; }

.hear-label {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer p { margin: 0 0 0.4rem; max-width: 42rem; }

/* ---------------------------------------------------------------- focus */

a:focus-visible,
.skip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header nav, .skip { display: none; }
  body { background: #fff; color: #000; }
}
