/* ============================================================
   EMBER — shared design tokens + reset
   ============================================================ */

:root {
  /* surfaces (warm charcoal ramp) */
  --bg-0: #0c0d0f;
  --bg-1: #131417;
  --bg-2: #1a1c20;
  --bg-3: #22242a;
  --bg-4: #2b2e35;

  --border: #2b2e34;
  --border-strong: #3a3e46;

  /* type */
  --text-0: #efece6;
  --text-1: #b9b6ae;
  --text-2: #7d7b74;

  /* accent — ember orange */
  --accent: #ff5c1a;
  --accent-hi: #ff7b42;
  --accent-soft: rgba(255, 92, 26, 0.14);
  --accent-glow: rgba(255, 92, 26, 0.35);

  --danger: #ff5f56;
  --ok: #58c98b;

  --font-ui: "Instrument Sans", "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;

  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 14px;

  --shadow-panel: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #14100d; }

a { color: inherit; text-decoration: none; }

button {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-0);
  background: transparent;
  border: none;
  cursor: pointer;
}

input, select, textarea {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-0);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

/* thin dark scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 6px;
  border: 2px solid var(--bg-1);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* generic accent button */
.btn-accent {
  background: var(--accent);
  color: #180d06;
  font-weight: 600;
  border-radius: var(--radius-s);
  padding: 8px 16px;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.btn-accent:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-accent:active { transform: translateY(1px); }

.btn-ghost {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  padding: 8px 16px;
  color: var(--text-1);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text-0); }

/* grain overlay used on marketing pages */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
