/* ShiftTruth — shared design tokens & base styles (shadcn/ui-like, dark) */

:root {
  --background: #0b1014;
  --foreground: #f1f4f7;
  --card: #111a22;
  --secondary: #18222c;
  --muted: #18222c;
  --muted-foreground: #c3ced8;
  --primary: #34d399;
  --primary-foreground: #052e22;
  --accent: #0e2a22;
  --destructive: #f87171;
  --warning: #fbbf24;
  --border: #26323d;
  --radius: 14px;
  --radius-sm: 9px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--muted-foreground);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.section-sub {
  max-width: 620px;
  margin-bottom: 32px;
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #d7e0e8;
}
.card p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 820px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 550;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover:not(:disabled) {
  background: #4ade9f;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--foreground);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: #1e2a36;
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--secondary);
}

.btn-destructive {
  background: transparent;
  color: var(--destructive);
  border-color: var(--border);
}

.btn-destructive:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--destructive);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* Inputs */
.input,
select.input,
textarea.input {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--foreground);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 550;
  margin-bottom: 6px;
  color: var(--foreground);
}

.field {
  margin-bottom: 16px;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-top: 4px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  background: var(--secondary);
}

.badge-primary {
  background: var(--accent);
  color: var(--primary);
  border-color: rgba(52, 211, 153, 0.35);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
  border-color: rgba(251, 191, 36, 0.35);
}

.badge-destructive {
  background: rgba(248, 113, 113, 0.12);
  color: var(--destructive);
  border-color: rgba(248, 113, 113, 0.35);
}

.badge-success {
  background: var(--accent);
  color: var(--primary);
  border-color: rgba(52, 211, 153, 0.35);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--secondary);
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Misc */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

.muted {
  color: var(--muted-foreground);
}

.text-warning {
  color: var(--warning);
}

.text-destructive {
  color: var(--destructive);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted-foreground);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--foreground);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.2s ease;
}

.toast-error {
  border-left-color: var(--destructive);
}

.toast-success {
  border-left-color: var(--primary);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .toast {
    animation: none;
  }
}

.btn-soon, .btn[aria-disabled="true"] {
  background: var(--secondary);
  color: var(--foreground);
  border: 1px solid var(--border);
  cursor: default;
  pointer-events: none;
}
.btn-soon:hover { text-decoration: none; opacity: 1; }
.launch-note {
  margin-top: 20px;
  max-width: 640px;
  font-size: 1.05rem;
  color: #d7e0e8;
}
