/* neo-retro base layer, vendored/adapted from felixubl/neo-retro for plain-CSS
   (non-Tailwind) use: self-hosted fonts, the mono body / slab display voice,
   and the small set of shared components every workshop page reuses. */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hepta Slab';
  src: url('fonts/HeptaSlab.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-line) transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

h1, h2, h3 {
  font-family: var(--slab);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

::selection {
  background: var(--accent-soft);
}

.font-slab {
  font-family: var(--slab);
  letter-spacing: -0.01em;
}

/* Layout shell shared by every page */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

/* Header / wordmark */
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}
.wordmark {
  font-family: var(--slab);
  font-weight: 800;
  font-size: 1.9rem;
  text-decoration: none;
  color: var(--ink);
  display: inline-block;
}
.wordmark .accent {
  color: var(--accent);
}
.tagline {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  max-width: 48ch;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.back-link:hover {
  color: var(--ink);
}

/* Round icon buttons (GitHub link, theme toggle, ...) */
.icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover {
  background: var(--surface2);
  color: var(--ink);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn .theme-sun {
  display: none;
}
[data-theme='dark'] .icon-btn .theme-moon {
  display: none;
}
[data-theme='dark'] .icon-btn .theme-sun {
  display: inline;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Section labels + lead lines, used to introduce a block of content */
.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin: 0 0 1rem;
}
.lead {
  font-family: var(--slab);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  margin: 0 0 0.75rem;
}
.muted {
  color: var(--muted);
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s var(--ease);
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--ink);
}
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Tags / badges */
.tag {
  display: inline-block;
  border-radius: 9999px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
}
.badge {
  display: inline-block;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
}

/* Cards + the dashed "not built yet" variant */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow-1);
}
.card.pop {
  box-shadow: var(--shadow-2);
}
.card.prompt {
  border: 1px dashed var(--accent-line);
  background: var(--accent-soft);
  box-shadow: none;
}

/* Inputs shared across tools */
.field {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  font: inherit;
  color: var(--ink);
}
.field::placeholder {
  color: var(--faint);
}

input[type='range'] {
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 9999px;
  background: var(--line);
  outline: none;
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-1);
}
input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-1);
}

/* Drag-and-drop file target, shared by every tool that accepts an upload */
.dropzone {
  display: block;
  border: 1px dashed var(--accent-line);
  border-radius: 16px;
  background: var(--accent-soft);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.dropzone:hover,
.dropzone.drag-over {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--ink);
}
.dropzone strong {
  color: inherit;
}
.dropzone input[type='file'] {
  display: none;
}
.dropzone .dz-filename {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.8rem;
}
footer a {
  color: inherit;
  text-decoration-color: var(--faint-soft);
}
footer a:hover {
  color: var(--ink);
}
