/* ============================================================
   dragonet.css — shared design system
   All pages and documents compose from these primitives.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&display=swap');

/* ── TOKENS ────────────────────────────────────────────────── */
:root {
  /* surfaces */
  --bg:         #0e1015;
  --surface-1:  #16191f;
  --surface-2:  #1d2029;
  --surface-3:  #32384a;

  /* accent */
  --teal:       #2ecfc3;
  --teal-bg:    #0a2826;
  --orange:     #f07030;
  --orange-bg:  #2a1508;
  --gold:       #d4a830;
  --gold-bg:    #251e06;
  --critical:   #e04545;
  --critical-bg:#2e1010;

  /* text */
  --text:       #e6e8f0;
  --text-mid:   #9aa2b8;
  --text-soft:  #606880;

  /* shadow */
  --shadow-sm:  0 2px 8px  rgba(0,0,0,0.22);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.30);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.38);

  /* radius */
  --radius:     18px;
  --radius-sm:  11px;
  --radius-xs:  6px;

  /* spacing scale */
  --space-xs:   6px;
  --space-sm:   12px;
  --space-md:   24px;
  --space-lg:   40px;
  --space-xl:   64px;

  /* card padding scale */
  --card-pad-sm: 16px 18px;
  --card-pad-md: 24px 26px;
  --card-pad-lg: 36px 38px;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
a    { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NOISE OVERLAY ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
}


/* ══════════════════════════════════════════════════════════════
   LAYOUT PRIMITIVES
   ══════════════════════════════════════════════════════════════ */

/* container */
.container {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

/* auto-fit responsive grid */
.grid          { display: grid; gap: 16px; }
.grid-2        { grid-template-columns: repeat(2, 1fr); }
.grid-3        { grid-template-columns: repeat(3, 1fr); }
.grid-auto     { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-auto-sm  { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-auto-lg  { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* flex row */
.row           { display: flex; gap: 16px; }
.row-center    { display: flex; gap: 16px; align-items: center; }
.row-between   { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.row-wrap      { display: flex; gap: 16px; flex-wrap: wrap; }
.row-wrap-center { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* stack — vertical flex */
.stack         { display: flex; flex-direction: column; gap: 12px; }
.stack-sm      { display: flex; flex-direction: column; gap: 6px; }
.stack-md      { display: flex; flex-direction: column; gap: 20px; }
.stack-lg      { display: flex; flex-direction: column; gap: 32px; }

/* align helpers */
.align-start   { align-items: flex-start; }
.align-center  { align-items: center; }
.align-end     { align-items: flex-end; }

/* spacing helpers */
.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }

/* margin-top helpers */
.mt-sm   { margin-top: var(--space-sm); }
.mt-md   { margin-top: var(--space-md); }
.mt-lg   { margin-top: var(--space-lg); }
.mt-xl   { margin-top: var(--space-xl); }

/* responsive breakdowns */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .row-md-stack    { flex-direction: column; }
}


/* ══════════════════════════════════════════════════════════════
   CARD
   ══════════════════════════════════════════════════════════════ */

.card {
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: var(--card-pad-md);
  box-shadow: var(--shadow-md);
}

/* padding scale */
.card-sm { padding: var(--card-pad-sm); border-radius: var(--radius-sm); }
.card-md { padding: var(--card-pad-md); }
.card-lg { padding: var(--card-pad-lg); }

/* surface variants */
.card-2  { background: var(--surface-2); }
.card-3  { background: var(--surface-3); }

/* color variants — tinted backgrounds */
.card-teal     { background: var(--teal-bg); }
.card-orange   { background: var(--orange-bg); }
.card-gold     { background: var(--gold-bg); }
.card-critical { background: var(--critical-bg); }

/* top accent bar */
.card-accent::before {
  content: '';
  display: block;
  height: 3px;
  margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md)) var(--space-md);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--teal);
}

.card-accent-teal::before   { background: var(--teal); }
.card-accent-orange::before { background: var(--orange); }
.card-accent-gold::before   { background: var(--gold); }

/* elevation on hover */
.card-hover {
  transition: box-shadow 0.2s, transform 0.2s;
}
.card-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}


/* ══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════════ */

/* eyebrow — section label */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 99px;
  flex-shrink: 0;
}
.eyebrow-full::after {
  content: '';
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 99px;
  flex-shrink: 0;
}

.eyebrow-center { justify-content: center; }
.eyebrow-center::before { display: none; }

.eyebrow-teal   { color: var(--teal); }
.eyebrow-orange { color: var(--orange); }
.eyebrow-gold   { color: var(--gold); }
.eyebrow-soft   { color: var(--text-soft); }

/* display headings */
.title-xl {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.title-lg {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.title-md {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.title-sm {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* body text */
.body-lg  { font-size: 18px; line-height: 1.75; color: var(--text-mid); }
.body-md  { font-size: 15px; line-height: 1.75; color: var(--text-mid); }
.body-sm  { font-size: 13px; line-height: 1.65; color: var(--text-mid); }
.body-xs  { font-size: 11px; line-height: 1.6;  color: var(--text-soft); }

/* inline highlight */
.hi-teal   { color: var(--teal); }
.hi-orange { color: var(--orange); }
.hi-gold   { color: var(--gold); }
.hi-text   { color: var(--text); font-weight: 600; }

/* mono / code */
.mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88em;
  color: var(--teal);
}


/* ══════════════════════════════════════════════════════════════
   BADGE / PILL
   ══════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-teal     { background: var(--teal-bg);     color: var(--teal); }
.badge-teal::before     { background: var(--teal); }
.badge-orange   { background: var(--orange-bg);   color: var(--orange); }
.badge-orange::before   { background: var(--orange); }
.badge-gold     { background: var(--gold-bg);     color: var(--gold); }
.badge-gold::before     { background: var(--gold); }
.badge-critical { background: var(--critical-bg); color: var(--critical); }
.badge-critical::before { background: var(--critical); }
.badge-soft     { background: var(--surface-2);   color: var(--text-soft); }
.badge-soft::before     { background: var(--text-soft); }

/* pill — same shape, no dot */
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-mid);
  white-space: nowrap;
}

.pill-teal   { background: var(--teal-bg);   color: var(--teal); }
.pill-orange { background: var(--orange-bg); color: var(--orange); }
.pill-gold   { background: var(--gold-bg);   color: var(--gold); }


/* ══════════════════════════════════════════════════════════════
   METRIC / STAT
   ══════════════════════════════════════════════════════════════ */

.metric { display: flex; flex-direction: column; gap: 4px; }

.metric-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-value-sm {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.metric-sub {
  font-size: 11px;
  color: var(--text-soft);
}

.metric-teal   .metric-value, .metric-teal   .metric-value-sm { color: var(--teal); }
.metric-orange .metric-value, .metric-orange .metric-value-sm { color: var(--orange); }
.metric-gold   .metric-value, .metric-gold   .metric-value-sm { color: var(--gold); }


/* ══════════════════════════════════════════════════════════════
   FRICTION PIPS
   ══════════════════════════════════════════════════════════════ */

.pips { display: flex; gap: 4px; align-items: center; }

.pip {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--surface-3);
}

.pip-teal   { background: var(--teal); }
.pip-gold   { background: var(--gold); }
.pip-orange { background: var(--orange); }


/* ══════════════════════════════════════════════════════════════
   AVATAR
   ══════════════════════════════════════════════════════════════ */

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }

.avatar-teal   { background: var(--teal-bg);   color: var(--teal); }
.avatar-orange { background: var(--orange-bg); color: var(--orange); }
.avatar-gold   { background: var(--gold-bg);   color: var(--gold); }


/* ══════════════════════════════════════════════════════════════
   ICON BLOCK
   ══════════════════════════════════════════════════════════════ */

img.logo {
  background: #fff0;
  width: 60px; height: 50px;
  border-radius: 50%;
}

.icon-block {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--surface-2);
}

.icon-block-sm { width: 34px; height: 34px; border-radius: 9px; font-size: 16px; }
.icon-block-lg { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; }

.icon-block-teal   { background: var(--teal-bg); }
.icon-block-orange { background: var(--orange-bg); }
.icon-block-gold   { background: var(--gold-bg); }


/* ══════════════════════════════════════════════════════════════
   CALLOUT
   ══════════════════════════════════════════════════════════════ */

.callout {
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  background: var(--surface-2);
}

.callout-teal   { background: var(--teal-bg); }
.callout-orange { background: var(--orange-bg); }
.callout-gold   { background: var(--gold-bg); }

.callout-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout-label::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.callout-teal   .callout-label { color: var(--teal); }
.callout-orange .callout-label { color: var(--orange); }
.callout-gold   .callout-label { color: var(--gold); }


/* ══════════════════════════════════════════════════════════════
   DIVIDER
   ══════════════════════════════════════════════════════════════ */

.divider {
  height: 1px;
  background: var(--surface-2);
  border: none;
  margin: var(--space-md) 0;
}

.divider-lg { margin: var(--space-lg) 0; }


/* ══════════════════════════════════════════════════════════════
   BUTTON
   ══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-teal   { background: var(--teal);   color: #0a2826; }
.btn-orange { background: var(--orange); color: #1a0a00; }
.btn-ghost  { background: var(--surface-2); color: var(--text-mid); }


/* ══════════════════════════════════════════════════════════════
   INPUT
   ══════════════════════════════════════════════════════════════ */

.input {
  background: var(--surface-2);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s;
  width: 100%;
}

.input::placeholder { color: var(--text-soft); }
.input:focus { box-shadow: 0 0 0 2px rgba(46,207,195,0.3), var(--shadow-md); }


/* ══════════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════════ */

.table-wrap {
  background: var(--surface-1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead tr { background: var(--surface-2); }

.table th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 14px 20px;
  text-align: left;
}

.table td {
  padding: 18px 20px;
  vertical-align: middle;
}

.table tbody tr + tr td { border-top: 1px solid var(--surface-2); }
.table tbody tr:hover td { background: var(--surface-2); }


/* ══════════════════════════════════════════════════════════════
   WORDMARK
   ══════════════════════════════════════════════════════════════ */

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.wordmark-blob {
  width: 18px; height: 18px;
  border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
  background: linear-gradient(135deg, var(--teal), var(--orange));
  flex-shrink: 0;
}

.wordmark-lg .wordmark-blob { width: 24px; height: 24px; }
.wordmark-lg { font-size: 13px; }


/* ══════════════════════════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
