/* singulars / oulipo design system - shared tokens + base styles
   reference: design-system/project/hmart design system.html */

:root {
  --background: #ffffff;
  --text-primary: rgba(0, 0, 0, 0.85);
  --text-hover: rgba(0, 0, 0, 0.7);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-tertiary: rgba(0, 0, 0, 0.5);
  --text-hint: rgba(0, 0, 0, 0.4);
  --border: rgba(0, 0, 0, 0.75);
  --border-light: rgba(0, 0, 0, 0.12);

  /* performance accents - hydra uses --hard as primary, others reserved */
  --reverse: #8b5cf6;
  --hard: #2aa4dd;
  --reinforcement: #02f700;
  --versus: #fee005;
  --carnation: #f6009b;

  --reverse-text: #6b3fe0;
  --hard-text: #1e6e96;
  --reinforcement-text: #0b7a0a;
  --versus-text: #6b5c00;
  --carnation-text: #b8006f;

  --type-size-nav: 1.08rem;
  --type-size-base: 1.06rem;
  --type-size-caption: 0.98rem;
  --type-size-meta: 0.96rem;

  --font-display: "VT323", ui-monospace, monospace;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-title: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--type-size-base);
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}
a:hover {
  opacity: 0.7;
}

::selection {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

/* shared mono caption pattern */
.mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.mono-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

/* the only emoji permitted is the heart in watch + spoken copy.
   render in primary color, small, no shrink. */
.heart {
  font-family: var(--font-mono);
  display: inline-block;
}

/* status pills - admin only */
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
  border: 1px solid transparent;
  line-height: 1.4;
}
.pill.upcoming {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}
.pill.training {
  background: #ffffff;
  border-color: #171717;
  color: #171717;
}
.pill.trained {
  background: #171717;
  border-color: #171717;
  color: #ffffff;
}

/* submit button - participant split, admin actions */
.submit-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--btn-color, var(--hard));
  padding: 0.85rem 2rem;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
  text-transform: lowercase;
  letter-spacing: 0;
  width: auto;
}
.submit-btn:hover {
  opacity: 0.7;
}
.submit-btn:focus-visible {
  outline: 3px solid var(--btn-color, var(--hard));
  outline-offset: 2px;
}
.submit-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* nav-link aesthetic for secondary actions */
.nav-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    opacity 0.3s ease;
  background: transparent;
  cursor: pointer;
  text-transform: lowercase;
}
.nav-link:hover {
  opacity: 0.7;
  border-color: rgba(0, 0, 0, 0.4);
}

/* hairline pulse - waiting state visual */
@keyframes hairline-pulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 0.4;
  }
}
.pulse {
  animation: hairline-pulse 4s ease-in-out infinite;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pulse {
    animation: none;
    opacity: 0.7;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
