/**
 * Habereta Design System
 * Shared tokens for web (and Flutter parity reference).
 * Product: Tender Intelligence Platform
 */

:root {
  /* Brand — Habereta blue / white */
  --hb-primary: #1e40af;
  --hb-primary-bright: #2563eb;
  --hb-primary-dark: #1e3a8a;
  --hb-primary-ink: #0f274f;
  --hb-primary-light: #f0f5ff;
  --hb-primary-soft: #dbe7ff;
  --hb-accent: #2563eb;
  --hb-accent-hover: #1d4ed8;

  /* Semantic */
  --hb-success: #16a34a;
  --hb-warning: #f59e0b;
  --hb-danger: #dc2626;
  --hb-info: #0284c7;

  /* Neutrals */
  --hb-text: #0f172a;
  --hb-text-secondary: #475569;
  --hb-muted: #64748b;
  --hb-border: #e2e8f0;
  --hb-border-strong: #cbd5e1;
  --hb-bg: #f1f5f9;
  --hb-bg-soft: #f8fafc;
  --hb-surface: #ffffff;

  /* Radius */
  --hb-radius-sm: 8px;
  --hb-radius: 12px;
  --hb-radius-lg: 16px;
  --hb-radius-xl: 24px;
  --hb-radius-pill: 999px;

  /* Shadows */
  --hb-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --hb-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
  --hb-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --hb-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);

  /* Layout */
  --hb-container: 1280px;
  --hb-header-h: 72px;
  --hb-gutter: 20px;
  --hb-section-pad: 100px;
  --hb-section-pad-md: 80px;
  --hb-section-pad-sm: 56px;

  /* Type */
  --hb-font: "Inter", "Noto Sans Ethiopic", system-ui, -apple-system, sans-serif;
  --hb-fs-nav: 15px;
  --hb-fs-badge: 13px;
  --hb-fs-hero: clamp(34px, 5vw, 56px);
  --hb-fs-hero-lead: clamp(16px, 2vw, 20px);
  --hb-fs-h2: clamp(28px, 3vw, 40px);
  --hb-fs-h3: 18px;
  --hb-fs-body: 16px;
  --hb-fs-meta: 14px;
  --hb-fs-small: 13px;
  --hb-lh-tight: 1.15;
  --hb-lh-snug: 1.35;
  --hb-lh-body: 1.55;

  /* Motion */
  --hb-ease: 0.2s ease;
}

/* Base utilities */
.hb-ds-font { font-family: var(--hb-font); }
.hb-ds-container {
  width: 100%;
  max-width: var(--hb-container);
  margin-inline: auto;
  padding-inline: var(--hb-gutter, 24px);
  box-sizing: border-box;
}

.hb-ds-section { padding: var(--hb-section-pad-sm) 0; }
@media (min-width: 768px) {
  .hb-ds-section { padding: var(--hb-section-pad-md) 0; }
}
@media (min-width: 1025px) {
  .hb-ds-section { padding: var(--hb-section-pad) 0; }
}

.hb-ds-card {
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius);
  box-shadow: var(--hb-shadow-sm);
}

.hb-ds-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--hb-radius-pill);
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  color: var(--hb-text);
  font-size: var(--hb-fs-small);
  font-weight: 600;
  text-decoration: none;
}

.hb-ds-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--hb-radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.hb-ds-badge--open { background: #ecfdf5; color: var(--hb-success); }
.hb-ds-badge--closed { background: #fef2f2; color: var(--hb-danger); }
.hb-ds-badge--featured { background: var(--hb-primary-light); color: var(--hb-primary-bright); }
.hb-ds-badge--urgent { background: #fff7ed; color: #c2410c; }
.hb-ds-badge--verified { background: #ecfdf5; color: var(--hb-success); }

.hb-ds-alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--hb-radius);
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
}

.hb-ds-input,
.hb-ds-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-sm);
  background: var(--hb-surface);
  font: inherit;
  font-size: var(--hb-fs-body);
  color: var(--hb-text);
}

.hb-ds-input:focus,
.hb-ds-select:focus {
  outline: none;
  border-color: var(--hb-primary-bright);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.hb-ds-grid-2,
.hb-ds-grid-3,
.hb-ds-grid-4 {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .hb-ds-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-ds-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-ds-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1025px) {
  .hb-ds-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hb-ds-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Telegram support link — icon + handle */
.hb-telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #229ed9;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
  vertical-align: middle;
}

.hb-telegram-link:hover {
  color: #1a8bc4;
  text-decoration: underline;
}

.hb-telegram-link__icon {
  flex-shrink: 0;
}

.hb-telegram-link--icon-only {
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
}

.hb-telegram-link--notice {
  margin-top: 8px;
}

.hb-telegram-link--block {
  display: flex;
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
}

.hb-telegram-link--footer {
  color: #93c5fd;
}

.hb-telegram-link--footer:hover {
  color: #fff;
}
