/* Rally — shared tokens and primitives
   Direction: "the court sheet". Paper, painted court lines, an optic-yellow ball
   used like a highlighter, and condensed sports-signage type. */

:root {
  /* Surfaces */
  --paper: #f5f3ee;
  --paper-2: #ebe8e0;
  --card: #fffefb;
  --line: #d8d4c9;
  --line-2: #e7e4dc;

  /* Text */
  --ink: #141a22;
  --ink-2: #2b333e;
  --muted: #565e69; /* 6.1:1 on paper */
  --faint: #626973; /* 5.0:1 on paper, 4.5:1 on paper-2 */

  /* Court (acrylic court blue) */
  --court: #24507f;
  --court-700: #1b3f66;
  --court-900: #102841;
  --court-100: #d9e4f0;
  --court-50: #ebf1f7;

  /* Ball (optic yellow) — fills and highlights only, never text on paper */
  --ball: #dcf03c;
  --ball-600: #c6dc22;
  --ball-100: #f2f8c6;

  /* Signals */
  --red: #c4311d;
  --red-700: #a3260f;
  --red-50: #fbe9e4;
  --amber: #925400;
  --amber-50: #fbefd8;
  --go: #1c6b45;
  --go-50: #e0efe5;
  --violet: #574497;
  --violet-50: #ebe7f6;

  --radius: 6px;
  --radius-sm: 4px;
  --shadow-pop: 0 1px 0 rgba(20, 26, 34, 0.04), 0 18px 40px -12px rgba(20, 26, 34, 0.28);

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, ui-sans-serif, sans-serif;
  --font: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 380ms;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--court);
  outline-offset: 2px;
}

::selection {
  background: var(--ball);
  color: var(--ink);
}

.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;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--ball);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

/* Logo: a top-down court with the ball in play */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1), transform var(--dur-1) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  flex: none;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 17px;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

.btn-ball {
  background: var(--ball);
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ball:hover {
  background: #e6f76a;
}

.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: var(--court-900);
  border-color: var(--court-900);
}

.btn-court {
  background: var(--court);
  border-color: var(--court);
  color: #fff;
}

.btn-court:hover {
  background: var(--court-700);
  border-color: var(--court-700);
}

.btn-green {
  background: var(--go);
  border-color: var(--go);
  color: #fff;
}

.btn-red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-red:hover {
  background: var(--red-700);
  border-color: var(--red-700);
}

.btn-outline {
  background: var(--card);
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ball-100);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.btn-ghost:hover {
  text-decoration-color: currentColor;
  background: rgba(20, 26, 34, 0.04);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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