/* ============================================================
   MTOPS Academy — design system
   Dark terminal base, mint + amber accents (pulled from the tool)
   ============================================================ */

:root {
  /* Canvas */
  --bg:        #080c16;
  --bg-1:      #0b1120;
  --bg-2:      #0e1626;
  --bg-3:      #131d31;
  --bg-raised: #16203580;

  /* Lines */
  --line:        rgba(132, 158, 196, 0.12);
  --line-2:      rgba(132, 158, 196, 0.20);
  --line-mint:   rgba(52, 224, 161, 0.34);
  --line-amber:  rgba(244, 169, 60, 0.34);

  /* Accents */
  --mint:       #34e0a1;
  --mint-deep:  #1eb583;
  --mint-soft:  rgba(52, 224, 161, 0.12);
  --mint-glow:  rgba(52, 224, 161, 0.22);
  --amber:      #f4a93c;
  --amber-deep: #d98a1e;
  --amber-soft: rgba(244, 169, 60, 0.12);
  --amber-glow: rgba(244, 169, 60, 0.22);
  --blue:       #6b9bd6;
  --blue-soft:  rgba(107, 155, 214, 0.14);
  --red:        #ef5a6b;
  --red-soft:   rgba(239, 90, 107, 0.12);

  /* Text */
  --tx:      #e8eef8;
  --tx-2:    #aab8d0;
  --tx-3:    #7587a6;
  --tx-4:    #54648a;

  /* Type */
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --disp: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;

  --accent: var(--mint);
  --accent-soft: var(--mint-soft);
  --accent-line: var(--line-mint);
  --accent-glow: var(--mint-glow);
}

/* Per-module accent flip */
[data-accent="amber"] {
  --accent: var(--amber);
  --accent-soft: var(--amber-soft);
  --accent-line: var(--line-amber);
  --accent-glow: var(--amber-glow);
}

/* ---------- Reading / light direction ---------- */
.dir-daylight {
  --bg:        #eef1f6;
  --bg-1:      #f6f8fb;
  --bg-2:      #ffffff;
  --bg-3:      #ffffff;
  --bg-raised: #ffffff;
  --line:        rgba(40, 60, 95, 0.12);
  --line-2:      rgba(40, 60, 95, 0.20);
  --line-mint:   rgba(22, 150, 105, 0.40);
  --line-amber:  rgba(190, 120, 20, 0.42);
  --mint:       #128a5e;
  --mint-deep:  #0e6e4a;
  --mint-soft:  rgba(18, 138, 94, 0.10);
  --mint-glow:  rgba(18, 138, 94, 0.16);
  --amber:      #b9791a;
  --amber-deep: #9c6410;
  --amber-soft: rgba(185, 121, 26, 0.12);
  --amber-glow: rgba(185, 121, 26, 0.16);
  --blue:       #3a6aa8;
  --red:        #cc3a4c;
  --tx:   #14203a;
  --tx-2: #3c4c6b;
  --tx-3: #5d6e8d;
  --tx-4: #8493ad;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle background grid texture */
.app-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
  opacity: .5;
}
.dir-daylight .app-bg { opacity: .7; }

::selection { background: var(--accent-glow); color: var(--tx); }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 20px; }
*::-webkit-scrollbar-thumb:hover { background: var(--tx-4); }

/* ---------- type helpers ---------- */
.mono { font-family: var(--mono); }
.disp { font-family: var(--disp); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--tx-3);
}

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--tx-2);
  background: var(--bg-2); white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.pill.mint { color: var(--mint); border-color: var(--line-mint); background: var(--mint-soft); }
.pill.mint .dot { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.pill.amber { color: var(--amber); border-color: var(--line-amber); background: var(--amber-soft); }
.pill.amber .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.pill.live .dot { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--r-s);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--tx-2);
  cursor: pointer; transition: all .16s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--accent-line); color: var(--tx); background: var(--bg-3); }
.btn.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.accent:hover { background: var(--accent); color: var(--bg); box-shadow: 0 0 22px var(--accent-glow); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- panel ---------- */
.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}

/* corner ticks for terminal feel */
.ticked { position: relative; }
.ticked::before, .ticked::after {
  content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none;
  border-color: var(--accent-line); border-style: solid; border-width: 0;
}
.ticked::before { top: 7px; left: 7px; border-top-width: 1px; border-left-width: 1px; }
.ticked::after  { bottom: 7px; right: 7px; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- striped placeholder ---------- */
.ph {
  border: 1px dashed var(--line-2);
  border-radius: var(--r-m);
  background-image: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 11px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  color: var(--tx-3); font-family: var(--mono); font-size: 12px; text-align: center; padding: 22px;
}
.ph .ph-tag { color: var(--accent); letter-spacing: .12em; text-transform: uppercase; font-size: 10px; }

.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { transform: translateY(8px); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .05ms !important; }
}
