/* ============================================================================
   CyberFarmer Design System Tokens ("Calm Swiss Botanical Studio")
   Version: 1.0.0 · cyberfarmer.ru
   ============================================================================ */

:root {
  /* Core Surfaces */
  --cf-bg-canvas: #F6F6F2;
  --cf-bg-surface: #FFFFFF;
  --cf-bg-subtle: #EFEFE9;
  --cf-bg-elevated: #FAF9F5;

  /* Ink & Typography */
  --cf-text-primary: #111614;
  --cf-text-secondary: #4B5550;
  --cf-text-muted: #75807A;

  /* Brand & Status Accents */
  --cf-brand-primary: #0F5132;
  --cf-brand-primary-hover: #0A3B24;
  --cf-brand-primary-soft: rgba(15, 81, 50, 0.08);

  --cf-status-ok: #15803D;
  --cf-status-ok-bg: #DCFCE7;
  --cf-status-ok-border: rgba(21, 128, 61, 0.22);

  --cf-brand-accent: #B86B2B;
  --cf-brand-accent-hover: #99551E;
  --cf-accent-bg: #FEF3C7;
  --cf-accent-border: rgba(184, 107, 43, 0.26);

  --cf-danger: #B91C1C;
  --cf-danger-bg: #FEE2E2;

  /* Borders & Shadows */
  --cf-border: rgba(17, 22, 20, 0.08);
  --cf-border-strong: rgba(17, 22, 20, 0.16);
  --cf-shadow-sm: 0 2px 10px rgba(17, 22, 20, 0.03), 0 1px 2px rgba(17, 22, 20, 0.04);
  --cf-shadow-md: 0 10px 28px rgba(17, 22, 20, 0.06), 0 2px 6px rgba(17, 22, 20, 0.04);
  --cf-shadow-lg: 0 20px 48px rgba(17, 22, 20, 0.09);

  /* Radii */
  --cf-radius-xl: 20px;
  --cf-radius-lg: 14px;
  --cf-radius-md: 10px;
  --cf-radius-pill: 9999px;

  /* Font Families */
  --cf-font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --cf-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cf-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --cf-container-max: 1240px;
  --cf-header-height: 70px;
}

/* Base Reset & Typography */
.cf-body {
  background-color: var(--cf-bg-canvas);
  color: var(--cf-text-primary);
  font-family: var(--cf-font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cf-container {
  width: 100%;
  max-width: var(--cf-container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.cf-h1, .cf-h2, .cf-h3, .cf-display {
  font-family: var(--cf-font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cf-text-primary);
  line-height: 1.08;
}

.cf-h1 {
  font-size: clamp(32px, 4.4vw, 52px);
}

.cf-h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.14;
}

.cf-h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

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

.cf-num {
  font-family: var(--cf-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Dot-Matrix Background Utility */
.cf-dot-matrix {
  background-image: radial-gradient(rgba(17, 22, 20, 0.085) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Bento Card & Spotlight */
.cf-card {
  background: var(--cf-bg-surface);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius-lg);
  box-shadow: var(--cf-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cf-card-xl {
  border-radius: var(--cf-radius-xl);
}

.cf-spotlight {
  position: relative;
  overflow: hidden;
}

.cf-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--mouse-x, -200px) var(--mouse-y, -200px),
    rgba(15, 81, 50, 0.065),
    transparent 45%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cf-spotlight:hover::before {
  opacity: 1;
}

.cf-spotlight:hover {
  border-color: rgba(15, 81, 50, 0.22);
  box-shadow: var(--cf-shadow-md);
}

/* Bento Grids */
.cf-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cf-bento-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 960px) {
  .cf-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .cf-container {
    padding: 0 16px;
  }
  .cf-bento-grid,
  .cf-bento-2 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.cf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--cf-radius-md);
  font-family: var(--cf-font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.cf-btn-primary {
  background: var(--cf-brand-primary);
  color: #FFFFFF;
}

.cf-btn-primary:hover {
  background: var(--cf-brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 81, 50, 0.18);
}

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

.cf-btn-accent:hover {
  background: var(--cf-brand-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(184, 107, 43, 0.2);
}

.cf-btn-secondary {
  background: var(--cf-bg-surface);
  color: var(--cf-text-primary);
  border-color: var(--cf-border-strong);
}

.cf-btn-secondary:hover {
  background: var(--cf-bg-subtle);
}

.cf-btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* Badges */
.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--cf-radius-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.cf-badge-ok {
  background: var(--cf-status-ok-bg);
  color: var(--cf-status-ok);
  border: 1px solid var(--cf-status-ok-border);
}

.cf-badge-accent {
  background: var(--cf-accent-bg);
  color: var(--cf-brand-accent);
  border: 1px solid var(--cf-accent-border);
}

.cf-badge-stone {
  background: var(--cf-bg-subtle);
  color: var(--cf-text-secondary);
  border: 1px solid var(--cf-border);
}

.cf-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cf-status-ok);
  box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45);
  animation: cfPulse 2.2s infinite;
}

@keyframes cfPulse {
  0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(21, 128, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

/* Brand Logo Lockup */
.cf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cf-text-primary);
}

.cf-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--cf-brand-primary);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cf-logo-wordmark {
  font-family: var(--cf-font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cf-logo-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--cf-text-muted);
  display: block;
}
