/* Base — synwrath
 * Reset + typography + layout primitives + minimal utilities.
 * Semantic CSS first; utility classes only where repetition justifies.
 */

@import './tokens.css';

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

html {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--type-4xl);
}

@media (min-width: 640px) { h1 { font-size: var(--type-5xl); } }
@media (min-width: 768px) { h1 { font-size: var(--type-6xl); } }

p {
  margin: 0;
  text-wrap: pretty;
}

blockquote {
  margin: 0;
  font-style: italic;
  text-wrap: pretty;
  line-height: 1.6;
  color: var(--color-foreground-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
}

a:hover {
  color: var(--color-foreground);
}

/* Section labels — mono caps */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-foreground-muted);
  margin: 0;
}

/* Held-state sections */
.section {
  padding: var(--space-24) var(--space-6);
  border-top: 1px solid var(--color-border);
}

.section--hero {
  min-height: 100vh;
  padding: var(--space-16) var(--space-6);
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section--full-bleed {
  min-height: calc(100vh - 4rem);
  padding: var(--space-16) 0 0;
  border-top: none;
}

.section__inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.section__inner--center {
  text-align: center;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background: oklch(0.10 0 0 / 0.8);
  backdrop-filter: blur(8px);
  padding: var(--space-4) var(--space-6);
}

.nav__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-family: var(--font-mono);
  font-size: var(--type-sm);
  letter-spacing: var(--tracking-tight);
  color: var(--color-foreground-muted);
}

.nav__brand:hover {
  color: var(--color-foreground);
}

.nav__links {
  display: flex;
  gap: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--type-sm);
  color: var(--color-foreground-muted);
}

/* Recognition states — yellow-against-purple, selective */
.recognition-warm {
  color: var(--color-warm);
}

.recognition-cool {
  color: var(--color-cool);
}

/* Constellation stage (dreamers / sitemap) */
.canvas-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - 4rem);
  overflow: hidden;
}

.canvas-stage svg {
  display: block;
  width: 100%;
  height: 100%;
}

.canvas-stage__hover {
  position: absolute;
  pointer-events: none;
  background: oklch(0.13 0 0 / 0.95);
  border: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  max-width: 22rem;
  font-size: var(--type-sm);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.canvas-stage__hover.is-visible {
  opacity: 1;
}

.canvas-stage__hover-name {
  font-family: var(--font-mono);
  font-size: var(--type-base);
  color: var(--color-foreground);
  margin-bottom: var(--space-2);
}

.canvas-stage__hover-register {
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--color-foreground-muted);
  margin-bottom: var(--space-3);
}

.canvas-stage__hover-blurb {
  color: var(--color-foreground-muted);
  font-style: italic;
  line-height: 1.5;
}

/* Door / form */
.door-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 22rem;
  margin: 0 auto;
}

.door-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.door-form input {
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  color: var(--color-foreground);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--type-sm);
  border-radius: 4px;
}

.door-form input:focus {
  outline: 1px solid var(--color-foreground-muted);
  outline-offset: -1px;
}

.door-form button {
  background: var(--color-foreground);
  color: var(--color-background);
  border: none;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--type-sm);
  cursor: pointer;
  border-radius: 4px;
  text-transform: lowercase;
  letter-spacing: var(--tracking-tight);
  transition: background 200ms ease;
}

.door-form button:hover:not(:disabled) {
  background: oklch(0.85 0 0);
}

.door-form button:disabled {
  background: var(--color-muted);
  color: var(--color-foreground-muted);
  cursor: not-allowed;
}

.door-form__hint {
  text-align: center;
  font-size: var(--type-xs);
  color: var(--color-foreground-muted);
  margin: 0;
}

/* Footer */
.footer {
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer p {
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  color: var(--color-foreground-muted);
}

/* Minimal utilities — used sparingly */
.text-muted { color: var(--color-foreground-muted); }
.text-mono { font-family: var(--font-mono); }
.text-lg { font-size: var(--type-lg); }
.text-xl { font-size: var(--type-xl); }
.text-pretty { text-wrap: pretty; }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
