/* ============================================================
   SILENTFIT — Global Reset & Base Styles
   ============================================================ */
@import url('./tokens.css');

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--black);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--interactive);
  text-decoration: none;
  transition: color var(--duration-micro) var(--ease-out);
}

a:hover {
  color: var(--text-display);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--text-display);
}

/* --- Utility Classes --- */
.label {
  font-family: var(--font-data);
  font-size: var(--label);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.2;
}

.caption {
  font-family: var(--font-data);
  font-size: var(--caption);
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mono {
  font-family: var(--font-data);
}

.display-font {
  font-family: var(--font-display);
}

.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-display { color: var(--text-display); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 24px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  transition: all var(--duration-micro) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--text-display);
  color: var(--black);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-visible);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-display);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 16px;
}

.btn-ghost:hover {
  color: var(--text-display);
}

.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-accent:hover {
  opacity: 0.9;
}

.btn-sm {
  font-size: 11px;
  padding: 8px 16px;
  min-height: 36px;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  transition: border-color var(--duration-micro) var(--ease-out);
}

.card:hover {
  border-color: var(--border-visible);
}

.card-raised {
  background: var(--surface-raised);
}

/* --- Tags / Chips --- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-data);
  font-size: var(--caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  color: var(--text-secondary);
}

.tag.active {
  border-color: var(--text-display);
  color: var(--text-display);
}

/* --- Dot Grid Background --- */
.dot-grid {
  background-image: radial-gradient(circle, var(--border-visible) 1px, transparent 1px);
  background-size: 16px 16px;
}

.dot-grid-subtle {
  background-image: radial-gradient(circle, var(--border) 0.5px, transparent 0.5px);
  background-size: 12px 12px;
}

/* --- Container / Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1440px;
}

.section {
  padding: var(--space-4xl) 0;
}

/* --- Inline Status Text --- */
.status-text {
  font-family: var(--font-data);
  font-size: var(--caption);
  letter-spacing: 0.04em;
}

.status-success {
  color: var(--success);
}

.status-error {
  color: var(--accent);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--border-visible);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-disabled);
}

/* --- Focus --- */
:focus-visible {
  outline: 1px solid var(--interactive);
  outline-offset: 2px;
}

/* --- SR Only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
