/* =========================================================
   iFound Hub — base layer: tokens, reset, typography, utils
   ========================================================= */

:root {
  --brand: #6366f1;
  --brand-2: #7c3aed;
  --brand-3: #22d3ee;
  --brand-soft: rgba(99, 102, 241, 0.12);
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.10));

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.14);
  --violet: #a855f7;
  --violet-soft: rgba(168, 85, 247, 0.14);

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --sidebar-w: 268px;
  --topbar-h: 68px;
  --ring: 0 0 0 4px rgba(99, 102, 241, 0.22);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme (default set on <html>) */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5fb;
  --bg-soft: #e9eef7;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #eef2f9;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-muted: #5a6b8c;
  --text-soft: #8494b0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, 0.28);
  --glass: rgba(255, 255, 255, 0.72);
  --grid-line: rgba(15, 23, 42, 0.07);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b18;
  --bg-soft: #0b1122;
  --surface: #101830;
  --surface-2: #161f3c;
  --surface-3: #1c2748;
  --border: rgba(148, 163, 210, 0.14);
  --border-strong: rgba(148, 163, 210, 0.26);
  --text: #e9edfb;
  --text-muted: #9aa8ca;
  --text-soft: #6f7d9e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 20px 45px -22px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.85);
  --glass: rgba(16, 24, 48, 0.66);
  --grid-line: rgba(148, 163, 210, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }

a { color: var(--brand); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--brand-2); }

img, svg { max-width: 100%; display: block; }

::selection { background: rgba(99, 102, 241, 0.32); }

*:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-soft); background-clip: padding-box; }

/* Material Symbols
   The icon font is self-hosted (public/assets/fonts) so icons never depend on a
   third-party CDN at runtime: if fonts.googleapis.com is blocked, slow or fails,
   the ligature names (e.g. light_mode) previously leaked into the UI as visible
   words. The font-family declaration below is what binds the class to the font,
   so it must stay here even though the page also links the Google stylesheet. */
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: local("Material Symbols Outlined"),
       local("Material Symbols Outlined Regular"),
       url("/assets/fonts/material-symbols-outlined.ttf") format("truetype");
}
.material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif;
  font-weight: normal;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 1.35rem;
  line-height: 1;
  user-select: none;
  vertical-align: middle;
}
.icon-fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.mi-sm { font-size: 1.05rem; }
.mi-lg { font-size: 1.8rem; }
.mi-xl { font-size: 2.6rem; }

/* Utilities */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-gap { gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.col { display: flex; flex-direction: column; }
.grid { display: grid; gap: 18px; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.center { text-align: center; }
.mono {
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  direction: ltr;
  unicode-bidi: embed;
}
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.full { width: 100%; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.76rem; }
.fw-700 { font-weight: 700; }
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.divider { height: 1px; background: var(--border); border: 0; margin: 16px 0; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -70px; z-index: 200;
  background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.brand-mark-sm { width: 30px; height: 30px; }
.brand-mark-lg { width: 62px; height: 62px; }
.glow { box-shadow: 0 0 60px -10px rgba(99, 102, 241, 0.6); }

