/* =========================================================
   Thayrony: mesa de operações
   Mobile-first · tokens no :root · sem dependências
   ========================================================= */

:root {
  --ink: #0a0e13;
  --panel: #121821;
  --panel-2: #1a2230;
  --line: rgba(226, 234, 245, 0.13);
  --text: #eef2f6;
  --muted: #9aa7b6;
  --on-bg: #d3dee6; /* texto pequeno direto sobre o fundo verde */
  --lime: #00ff84;
  --lime-ink: #11170a;
  --down: #46536a;

  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gutter: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  /* a cor fica no <html>; aqui ela cobriria a camada .bg */
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 700;
  border-radius: 8px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ---------- Fundo ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  height: 100lvh;
  background: url("../img/bg.jpg") center / cover no-repeat;
  background-image: image-set(url("../img/bg.webp") type("image/webp"), url("../img/bg.jpg") type("image/jpeg"));
}
/* tela deitada: a imagem vertical perderia a onda no corte */
@media (min-aspect-ratio: 1/1) {
  .bg {
    background-image: url("../img/bg-wide.jpg");
    background-image: image-set(url("../img/bg-wide.webp") type("image/webp"), url("../img/bg-wide.jpg") type("image/jpeg"));
  }
}
/* escurece a onda para o texto e o botão continuarem legíveis */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 19, 0.62);
}

/* ---------- Estrutura ---------- */

.shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Barra superior ---------- */

.stage { container-type: inline-size; }

.bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 0 10px;
}
.bar__actions { display: flex; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover { border-color: var(--lime); color: var(--lime); }
.icon-btn.is-done { background: var(--lime); color: var(--lime-ink); }

/* ---------- Quadro do gráfico / foto ---------- */

.frame {
  position: relative;
  height: min(48svh, 112cqw);
  min-height: 300px;
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: linear-gradient(180deg, var(--panel), var(--ink));
  overflow: hidden;
  isolation: isolate;
  /* a base do quadro some atrás do nome */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
}
.frame__photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 0;
}

.chart { position: absolute; inset: 0; width: 100%; height: 100%; }

/* a foto substitui o gráfico no quadro */
.has-photo .chart { display: none; }

.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__level { stroke: var(--lime); stroke-width: 1; stroke-dasharray: 4 5; opacity: 0.7; }
.candle { transform-box: fill-box; transform-origin: center; animation: grow 0.7s var(--ease) both; animation-delay: calc(var(--i) * 34ms); }
.candle line { stroke-width: 1.5; }
.candle--up line { stroke: var(--lime); }
.candle--up rect { fill: var(--lime); }
.candle--down line { stroke: var(--down); }
.candle--down rect { fill: var(--down); }
.chart__pulse {
  fill: var(--lime);
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s ease-out infinite;
}

/* ---------- Nome ---------- */

.id {
  position: relative;
  z-index: 1;
  margin-top: -11cqw;
  text-align: center;
}
.id__name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 26.6cqw;
  line-height: 0.84;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  white-space: nowrap;
}
.id__user {
  display: inline-block;
  padding: 6px 8px 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--lime);
}

/* ---------- Faixa de cotações (bio) ---------- */

.ticker {
  margin-top: 14px;
  padding: 9px 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
}
.ticker__track { display: flex; flex-wrap: wrap; width: 100%; }
.ticker__group {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-bg);
}
.ticker__group li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ticker__group li::before {
  content: "";
  border-inline: 4px solid transparent;
  border-bottom: 6px solid var(--lime);
}

/* animada quando há JS e o visitante aceita movimento */
.ticker.is-on .ticker__track { flex-wrap: nowrap; width: max-content; animation: slide 30s linear infinite; }
.ticker.is-on .ticker__group { flex-wrap: nowrap; padding-right: 18px; }
.ticker.is-on:hover .ticker__track { animation-play-state: paused; }

/* ---------- Links ---------- */

.links { display: grid; gap: 10px; margin-top: 14px; }

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 84px;
  padding: 10px 12px 10px 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
a.row[href]:hover { transform: translateY(-2px); border-color: var(--lime); }
a.row[href]:active { transform: scale(0.985); }

.row__thumb {
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--panel-2);
}
.row__thumb picture, .row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__thumb--icon, .row__thumb--logo { display: grid; place-items: center; }
.row__thumb--icon svg { width: 34px; height: 34px; fill: currentColor; }
.row__thumb--ig svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.row__thumb--logo picture { width: 66%; height: 66%; }
.row__thumb--logo img { object-fit: contain; }

.row__body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row__title { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.row__desc { font-size: 0.84rem; color: var(--muted); line-height: 1.3; }

.row__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--lime);
  border: 1px solid var(--line);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.row__go svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a.row[href]:hover .row__go { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }

/* Destaque: WhatsApp */
.row--main {
  min-height: 92px;
  background: var(--lime);
  border-color: var(--lime);
  color: var(--lime-ink);
}
.row--main .row__thumb { background: var(--lime-ink); color: var(--lime); }
.row--main .row__title { font-size: 1.2rem; }
.row--main .row__desc { color: rgba(17, 23, 10, 0.78); }
.row--main .row__go { background: var(--lime-ink); border-color: var(--lime-ink); color: var(--lime); }
a.row--main[href]:hover { border-color: var(--text); }
a.row--main[href]:hover .row__go { background: var(--lime-ink); border-color: var(--lime-ink); color: var(--lime); }

/* Sem destino configurado */
.row.is-soon { cursor: default; }
.row.is-soon .row__go {
  width: auto;
  height: auto;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px dashed currentColor;
  background: none;
  color: inherit;
  opacity: 0.75;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Rodapé ---------- */

.foot {
  margin-top: 30px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  text-align: center;
}
.foot__line {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.foot__line i { font-style: normal; color: var(--lime); padding: 0 3px; }
.foot__risk {
  max-width: 34ch;
  margin: 10px auto 0;
  font-size: 0.74rem;
  color: var(--on-bg);
}
.foot__copy { margin-top: 6px; font-size: 0.74rem; color: var(--on-bg); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--lime);
  background: var(--ink);
  font-size: 0.84rem;
  transform: translate(-50%, 160%);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Animações ---------- */

@keyframes grow { from { transform: scaleY(0); opacity: 0; } }
@keyframes pulse {
  from { transform: scale(0.6); opacity: 0.8; }
  to { transform: scale(2.4); opacity: 0; }
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Desktop: duas colunas ---------- */

@media (min-width: 960px) {
  .shell {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 440px);
    justify-content: center;
    align-items: center;
    gap: 56px;
    max-width: none;
    min-height: 100dvh;
    padding-block: 24px;
  }
  .frame { height: min(62vh, 560px); }
  .ticker { margin-top: 0; }
  .foot { padding-bottom: 0; }
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }
  .chart__pulse { opacity: 0; }
}
