/* ============================================================
   Deengle brand system — design tokens + base styles.
   Shared by the marketing site, card viewer and dashboard.
   ============================================================ */

@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand — monochrome editorial. The chrome is black and white;
     colour belongs to the product (the cards) and the logo alone. */
  --brand-800: #0B0B0D;
  --brand-700: #000000;
  --brand-600: #111114;
  --brand-500: #2A2A30;
  --brand-100: #E7E7EA;
  --brand-050: #F2F2F4;

  --amber-600: #9C7409;
  --amber-500: #FCB90F;
  --amber-050: #FEF6DF;

  /* Neutrals — crisp paper, hairline borders */
  --ink:      #0A0A0B;
  --ink-2:    #3A3A41;
  --muted:    #6B6B76;
  --line:     #E7E7EA;
  --paper:    #FCFCFD;
  --surface:  #FFFFFF;
  --surface-2:#F5F5F6;

  --danger:   #B3372E;
  --danger-050:#FBEDEB;
  --ok:       #2E7D4F;
  --ok-050:   #EAF5EE;

  /* Type */
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shape & depth */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-1: 0 1px 2px rgba(22, 33, 29, 0.06), 0 1px 6px rgba(22, 33, 29, 0.05);
  --shadow-2: 0 4px 14px rgba(22, 33, 29, 0.08), 0 1px 4px rgba(22, 33, 29, 0.06);
  --shadow-card: 0 18px 40px rgba(10, 30, 25, 0.30);

  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.4em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1em; }
a  { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 0.95rem/1 var(--font);
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease;
  text-decoration: none !important;
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.btn-primary { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-050); }

.btn-amber { background: var(--amber-500); color: #3A2504; }
.btn-amber:hover:not(:disabled) { background: #E39A2F; }

.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 16px; }
label.field > span {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.input, select.input, textarea.input {
  width: 100%;
  font: 500 1rem/1.3 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-050); }
.input::placeholder { color: #9AA69F; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }

/* ---------- Surfaces ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.panel-pad { padding: 22px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--brand-050);
  color: var(--brand-700);
}
.pill-amber { background: var(--amber-050); color: var(--amber-600); }
.pill-danger { background: var(--danger-050); color: var(--danger); }
.pill-ok { background: var(--ok-050); color: var(--ok); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 100;
  max-width: min(88vw, 480px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Utility ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
