/* Passada — tokens e base
   Conceito: placas pretas (onde o movimento vive) dentro de páginas de giz
   (onde o laudo é lido). Cor é dado; a interface é tinta. */

:root {
  /* superfícies */
  --chalk: #ECEEEA;
  --chalk-deep: #E1E4DE;
  --paper: #F7F8F5;
  --rule: #CDD1CA;
  --rule-strong: #A2A79F;
  --ink: #121417;
  --ink-2: #3A3F46;
  --ink-3: #626870;
  --ink-4: #8C9299;

  /* placas (palco do movimento) */
  --plate: #000000;
  --plate-raise: #101216;
  --plate-line: rgba(255, 255, 255, .13);
  --plate-text: #EEF1F6;
  --plate-text-2: rgba(238, 241, 246, .68);
  --plate-text-3: rgba(238, 241, 246, .44);
  --trace: #F2F5FA;

  /* dados */
  --left: #FF6A1F;
  --left-ink: #D4500C;
  --right: #2F8CFF;
  --right-ink: #1C6AD0;
  --ghost: #A895FF;
  --ghost-glow: rgba(140, 110, 255, .6);
  --ghost-ink: #5B3FE6;
  --ghost-tint: #E7E2FF;
  --heat-1: #FFE14D;
  --heat-2: #FF9A1F;
  --heat-3: #FF4128;

  /* estado */
  --ok: #1E9561;
  --watch: #C98500;
  --priority: #D9363C;
  --ok-tint: #D9EEE2;
  --watch-tint: #F4E8C8;
  --priority-tint: #F6D9D9;

  /* tipo: uma família, eixo de largura como voz */
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w-cond: 70%;
  --w-semi: 86%;
  --w-norm: 100%;
  --w-wide: 118%;

  --fs-12: .75rem;
  --fs-13: .8125rem;
  --fs-14: .875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-21: 1.3125rem;
  --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-36: 2.25rem;
  --fs-48: 3rem;
  --fs-60: 3.75rem;
  --fs-72: 4.5rem;
  --fs-96: 6rem;

  /* raio por hierarquia: placa > painel > controle */
  --r-plate: 22px;
  --r-panel: 14px;
  --r-ctl: 10px;
  --r-pill: 999px;

  --gap: 24px;
  --pad: clamp(16px, 3.2vw, 44px);
  --maxw: 1440px;
  --topbar-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 140ms;
  --t: 240ms;
  --t-slow: 520ms;

  --shadow-plate: 0 40px 80px -40px rgba(8, 10, 18, .6), 0 1px 0 rgba(0, 0, 0, .05);
  --shadow-pop: 0 18px 40px -18px rgba(8, 10, 18, .35), 0 0 0 1px rgba(18, 20, 23, .06);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-16);
  font-stretch: var(--w-norm);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 800;
  font-stretch: var(--w-cond);
  letter-spacing: -.012em;
  line-height: 1.02;
  text-wrap: balance;
}
h1 { font-size: clamp(var(--fs-36), 5.6vw, var(--fs-72)); }
h2 { font-size: clamp(var(--fs-30), 3.4vw, var(--fs-48)); }
h3 { font-size: var(--fs-24); }
h4 { font-size: var(--fs-18); font-stretch: var(--w-semi); font-weight: 750; letter-spacing: 0; }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img, svg, video, canvas { display: block; max-width: 100%; }
svg { overflow: visible; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
::selection { background: var(--ghost-tint); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ghost-ink);
  outline-offset: 2px;
  border-radius: 6px;
}
.plate :focus-visible { outline-color: var(--ghost); }

.num {
  font-variant-numeric: tabular-nums;
  font-stretch: var(--w-cond);
  font-feature-settings: "tnum" 1;
}
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-14); }
.tiny { font-size: var(--fs-12); }
.prose { max-width: 68ch; }
.prose p + p { margin-top: .8em; }
.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;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap-row { flex-wrap: wrap; }
.spacer { flex: 1; }

/* Marca: o nome deixa rastros, como numa cronofotografia */
.wordmark {
  font-weight: 850;
  font-stretch: 74%;
  letter-spacing: -.02em;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  text-shadow:
    -5px 0 0 rgba(18, 20, 23, .16),
    -10px 0 0 rgba(18, 20, 23, .07);
  white-space: nowrap;
}
.plate .wordmark { color: var(--plate-text); text-shadow: -5px 0 0 rgba(168, 149, 255, .38), -10px 0 0 rgba(168, 149, 255, .16); }

.boot {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.wordmark--boot {
  font-size: 44px;
  animation: boot-echo 1.2s var(--ease-io) infinite alternate;
}
@keyframes boot-echo {
  from { text-shadow: -2px 0 0 rgba(18, 20, 23, .14), -4px 0 0 rgba(18, 20, 23, .06); }
  to { text-shadow: -10px 0 0 rgba(18, 20, 23, .16), -20px 0 0 rgba(18, 20, 23, .07); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
