@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;800&family=Inter:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-raised: #faf8f3;
  --border: rgba(20, 17, 13, 0.12);
  --border-strong: rgba(20, 17, 13, 0.32);
  --text: #14110d;
  --text-dim: #6b6359;
  --accent-a: #d9531e;
  --accent-b: #1f5fbf;
  --accent-c: #e6a817;
  --ok: #2f7d4f;
  --warn: #a67c00;
  --bad: #c0392b;
  --font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background: transparent;
  line-height: 1.5;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a { color: var(--accent-b); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }

code, pre, .mono { font-family: var(--font-mono); }

.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Kept for pages that still reference it; renders as a plain panel in the paper theme. */
.glass-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-a); border-color: var(--accent-a); color: #fff; text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--accent-b); outline-offset: 3px; }
.btn.secondary { background: transparent; color: var(--text); }
.btn.secondary:hover { background: var(--text); color: var(--bg); }
.btn:disabled { opacity: 0.55; cursor: default; }

.magnetic {
  display: inline-block;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

/* --- Collapse wordmark (hero) --- */
.collapse {
  display: flex;
  gap: 0.01em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 13.5vw, 12rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  text-transform: uppercase;
}
.collapse .glyph { position: relative; display: inline-block; }
.collapse .real { position: relative; z-index: 2; animation: collapseReal 7s ease-in-out infinite; }
.collapse .dup { position: absolute; inset: 0; z-index: 1; opacity: 0; animation: collapseDup 7s ease-in-out infinite; }
.collapse .dup.one { color: var(--accent-a); }
.collapse .dup.two { color: var(--accent-b); }
.collapse .dup.three { color: var(--accent-c); }
@keyframes collapseDup {
  0% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0.9; }
  35% { transform: translate(0, 0) rotate(0); opacity: 0.9; }
  55% { transform: translate(0, 0) rotate(0); opacity: 0; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}
@keyframes collapseReal {
  0% { opacity: 0.18; }
  35% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0.18; }
}

@media (prefers-reduced-motion: reduce) {
  .magnetic { transition: none; }
  tr.row-enter { animation: none; }
  .collapse .dup { animation: none; opacity: 0; }
  .collapse .real { animation: none; opacity: 1; }
}

.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: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  background: var(--bg-raised);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.skip-link:focus {
  top: 1rem;
}
