/* ==========================================================================
   TechMonk — design tokens + primitives
   Blockive Deduction Academy Private Limited
   ========================================================================== */

:root {
  /* ink / surfaces */
  --ink-900: #06070a;
  --ink-850: #0a0c11;
  --ink-800: #0e1118;
  --ink-750: #12151e;
  --ink-700: #171b26;
  --ink-600: #1f2432;
  --ink-500: #2b3242;

  /* text */
  --fg: #eef1f6;
  --fg-muted: #a7b0c0;
  --fg-dim: #737d8f;

  /* brand */
  --mint: #32e6b0;
  --mint-600: #16c795;
  --mint-dim: rgba(50, 230, 176, .12);
  --saffron: #ffb453;
  --saffron-dim: rgba(255, 180, 83, .12);
  --violet: #8b7cff;
  --violet-dim: rgba(139, 124, 255, .13);
  --rose: #ff6b81;
  --rose-dim: rgba(255, 107, 129, .12);
  --sky: #5cc8ff;

  /* lines */
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);

  /* geometry */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --maxw: 1200px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 12px 30px -12px rgba(0,0,0,.65);
  --shadow-lg: 0 40px 80px -32px rgba(0,0,0,.8);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.02em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.65rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); letter-spacing: -.03em; }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1rem; color: var(--fg-muted); }

::selection { background: var(--mint); color: #04110c; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(56px, 8vw, 108px); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mint); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--fg-muted); max-width: 62ch; }
.muted { color: var(--fg-muted); }
.dim { color: var(--fg-dim); }
.mono { font-family: var(--mono); font-size: .82em; letter-spacing: -.01em; }
.tiny { font-size: .8rem; }
.gradient-text {
  background: linear-gradient(103deg, var(--fg) 18%, var(--mint) 58%, var(--saffron) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--ink-700);
  --btn-fg: var(--fg);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: .93rem; font-weight: 570; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.26); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: linear-gradient(96deg, var(--mint) 0%, #59f0c4 100%); --btn-fg: #04120d; border-color: transparent; font-weight: 640; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { --btn-bg: transparent; }
.btn-soft { --btn-bg: rgba(255,255,255,.05); }
.btn-sm { padding: 7px 14px; font-size: .84rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-danger { --btn-bg: var(--rose-dim); --btn-fg: var(--rose); border-color: rgba(255,107,129,.3); }

/* ---------- surfaces ---------- */
.card {
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.card-pad-sm { padding: 18px; }
.card-hover { transition: border-color .2s ease, transform .2s ease; }
.card-hover:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.04);
  font-size: .76rem; font-weight: 560; color: var(--fg-muted); white-space: nowrap;
}
.pill-mint   { color: var(--mint);    background: var(--mint-dim);    border-color: rgba(50,230,176,.28); }
.pill-saffron{ color: var(--saffron); background: var(--saffron-dim); border-color: rgba(255,180,83,.28); }
.pill-violet { color: var(--violet);  background: var(--violet-dim);  border-color: rgba(139,124,255,.3); }
.pill-rose   { color: var(--rose);    background: var(--rose-dim);    border-color: rgba(255,107,129,.28); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot-live { box-shadow: 0 0 0 0 currentColor; animation: pulse 2.2s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(50,230,176,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(50,230,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(50,230,176,0); }
}

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 16px; }
.label { display: block; font-size: .82rem; font-weight: 580; color: var(--fg-muted); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  background: var(--ink-850); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--fg-dim); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-dim); }
.textarea { resize: vertical; min-height: 96px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-dim) 50%), linear-gradient(135deg, var(--fg-dim) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.hint { font-size: .78rem; color: var(--fg-dim); margin-top: 6px; }
.error-text { font-size: .82rem; color: var(--rose); }

/* ---------- misc ---------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.skeleton-bar { height: 6px; border-radius: 999px; background: var(--ink-600); overflow: hidden; }
.skeleton-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--sky)); }
.scroll-x { overflow-x: auto; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: .8rem; font-weight: 650;
  background: var(--ink-600); color: var(--fg); border: 1px solid var(--line-strong);
}
.avatar-lg { width: 52px; height: 52px; font-size: 1rem; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
