/* SOF-RACER portal — .aif-* utility classes.
   Loaded ONLY on /sofracer routes (via SofRacer.astro). Design tokens
   (--ink-*, --clay-*, --paper-*, fonts) come from /assets/tokens.css. */

* {
  box-sizing: border-box;
}

/* ---------- shared utility ---------- */
.aif-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}
.aif-eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 10.5px;
  color: var(--clay-900);
  font-weight: 500;
}
.aif-paper {
  background-color: var(--paper-150);
  background-image: url("/assets/page_bg_texture.png");
  background-size: 600px;
  background-blend-mode: multiply;
}

/* hairline that survives screens */
.aif-hairline {
  border-bottom: 1px solid rgba(17, 21, 25, 0.08);
}

/* status pill */
.aif-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.aif-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.aif-pill.open {
  background: rgba(94, 138, 134, 0.14);
  color: var(--sage-700);
}
.aif-pill.open .dot {
  background: var(--sage-500);
  box-shadow: 0 0 0 3px rgba(94, 138, 134, 0.2);
}
.aif-pill.closed {
  background: rgba(88, 99, 111, 0.1);
  color: var(--ink-700);
}
.aif-pill.closed .dot {
  background: var(--ink-700);
}

/* type pill */
.aif-type-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.aif-type-pill.baa,
.aif-type-pill.rpp {
  background: rgba(119, 92, 73, 0.1);
  color: var(--clay-900);
  border: 1px solid rgba(119, 92, 73, 0.18);
}
.aif-type-pill.rfi {
  background: rgba(122, 144, 168, 0.12);
  color: var(--sky-900);
  border: 1px solid rgba(122, 144, 168, 0.25);
}
.aif-type-pill.ota,
.aif-type-pill.rwp {
  background: rgba(94, 138, 134, 0.12);
  color: var(--sage-700);
  border: 1px solid rgba(94, 138, 134, 0.25);
}
.aif-type-pill.challenge {
  background: rgba(216, 140, 86, 0.12);
  color: var(--clay-700);
  border: 1px solid rgba(216, 140, 86, 0.3);
}

/* ---------- buttons ---------- */
.aif-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    filter 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 160ms;
  font-family: var(--font-sans);
  white-space: nowrap;
}
.aif-btn:hover {
  filter: brightness(1.05);
}
.aif-btn:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}
.aif-btn.primary {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}
.aif-btn.clay {
  background: var(--clay-900);
  color: #fff;
  border-color: var(--clay-900);
}
.aif-btn.outline {
  background: transparent;
  color: var(--ink-900);
  border-color: rgba(17, 21, 25, 0.18);
}
.aif-btn.ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: transparent;
}
.aif-btn.lg {
  height: 48px;
  padding: 0 22px;
  font-size: 14px;
}

/* arrow */
.aif-arrow::after {
  content: "→";
  font-family: var(--font-mono);
  margin-left: 2px;
}

/* ---------- cards ---------- */
.aif-card {
  background: var(--paper-50);
  border: 1px solid rgba(17, 21, 25, 0.08);
  border-radius: 6px;
}
.aif-kraft {
  background: var(--paper-200);
  border: 1px solid var(--clay-500);
  border-radius: 6px;
}

/* ---------- hero radial ---------- */
.aif-hero-radial {
  background: radial-gradient(
    120% 100% at 50% 0%,
    rgba(35, 40, 46, 0.95) 0%,
    rgb(17, 21, 25) 60%,
    rgb(8, 11, 14) 100%
  );
}

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--sky-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Native document/panel scrollbars — thin + soft thumb (standard + webkit). */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 21, 25, 0.28) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(17, 21, 25, 0.15);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(17, 21, 25, 0.3);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* table-like rows */
.aif-row {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(17, 21, 25, 0.06);
  transition: background 200ms;
  cursor: pointer;
}
.aif-row:hover {
  background: rgba(17, 21, 25, 0.025);
}
.aif-row.head {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10.5px;
  color: var(--ink-700);
  padding: 12px 20px;
  border-bottom: 1px solid rgba(17, 21, 25, 0.1);
  cursor: default;
}
.aif-row.head:hover {
  background: transparent;
}

/* dashed kraft */
.aif-dashed {
  border: 1px dashed var(--clay-300);
  border-radius: 6px;
  background: var(--clay-100);
}

/* tabs */
.aif-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(17, 21, 25, 0.1);
}
.aif-tab {
  padding: 14px 0;
  margin-right: 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 200ms;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  font-family: inherit;
}
.aif-tab:hover {
  color: var(--ink-900);
}
.aif-tab.active {
  color: var(--ink-900);
  border-bottom-color: var(--clay-900);
}

/* marquee for ticker */
@keyframes aif-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.aif-marquee {
  display: flex;
  gap: 48px;
  animation: aif-marquee 60s linear infinite;
  white-space: nowrap;
}
.aif-marquee:hover {
  animation-play-state: paused;
}

/* fade */
@keyframes aif-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.aif-fade {
  animation: aif-fade-up 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* glow ring */
.aif-ring {
  box-shadow:
    0 0 0 1px rgba(216, 140, 86, 0.4),
    0 6px 24px rgba(216, 140, 86, 0.18);
}

/* dotted bg pattern (technical chrome) */
.aif-dotgrid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
}
.aif-dotgrid-light {
  background-image: radial-gradient(rgba(17, 21, 25, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* grid lines */
.aif-gridlines {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
}
