/* Tradu Now: base comum.
   Linguagem: sinalização bilíngue (aeroporto/metrô) + equipamento de cabine de intérprete.
   Cantos retos, blocos de cor chapados, filetes grossos, nada de sombra ou degradê. */

@font-face {
  font-family: 'Atkinson Next';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/atkinson-next.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Next';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/atkinson-next-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* fonte de placa: Archivo condensada e pesada, para nomes de idioma e números de canal */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/fonts/archivo.woff2) format('woff2');
}

:root {
  /* constantes */
  --navy: #0e1a33;
  --paper: #f3efe4;
  --pt: #17894f;
  --es: #d1373d;
  --signal: #ffc928;
  --alert: #ff8a65;

  /* tema claro (padrão): alumínio de placa de sinalização */
  --bg: #eef1f5;
  --bg-2: #e1e6ee;
  --surface: #ffffff;
  --text: #0e1a33;
  --dim: #53627d;
  --faint: #8d9ab0;
  --rule: #c3cbd8;
  --signal-text: #7a5900;
  --signal-dot: #e3a600;
  --alert-text: #b83c12;

  --font: 'Atkinson Next', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Archivo', 'Arial Narrow', ui-sans-serif, sans-serif;

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.625rem;
  --t-2xl: 2.0625rem;
  --t-3xl: 2.5625rem;
  --t-4xl: 3.5rem;

  --line: 2px solid var(--rule);
  color-scheme: light;
}

/* tema escuro: azul-noite, para auditório no escuro e cabine */
[data-theme="dark"] {
  --pt: #1f9d5c;
  --es: #d93a3f;
  --bg: #0e1a33;
  --bg-2: #15254b;
  --surface: #15254b;
  --text: #f3efe4;
  --dim: #a3b3d1;
  --faint: #6c80a8;
  --rule: #2d4475;
  --signal-text: #ffc928;
  --signal-dot: #ffc928;
  --alert-text: #ff8a65;
  color-scheme: dark;
}

* { box-sizing: border-box; border-radius: 0; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.hidden { display: none !important; }

/* texto de placa */
.sign { font-family: var(--display); font-stretch: 72%; font-weight: 800; letter-spacing: -0.005em; line-height: .95; }

/* número de canal: quadrado sólido, como no receptor de tradução */
.ch-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.6em;
  height: 1.6em;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  line-height: 1;
  background: var(--navy);
  color: #fff;
}

/* lâmpada "ao vivo": o único elemento redondo, é um LED */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.live-dot.on { background: var(--signal-dot); animation: live-pulse 1.8s ease-out infinite; }
.live-dot.off { background: var(--alert); }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgb(255 201 40 / .55); }
  70% { box-shadow: 0 0 0 8px rgb(255 201 40 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(255 201 40 / 0); }
}

/* VU de 3 barras: só se mexe quando a tradução está falando */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.eq i { width: 3px; height: 3px; background: currentColor; }
.eq.on i { animation: eq .9s ease-in-out infinite; }
.eq.on i:nth-child(2) { animation-delay: -.3s; }
.eq.on i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

/* legendas: a linha atual ganha um filete na cor do canal */
.captions { overflow-y: auto; display: flex; flex-direction: column; gap: .75em; scroll-behavior: smooth; overscroll-behavior: contain; }
.captions .line { font-size: var(--cap-size, 1.5rem); line-height: 1.36; color: color-mix(in srgb, var(--text) 48%, transparent); transition: color .4s; max-width: 34em; text-wrap: pretty; padding-left: 14px; border-left: 4px solid transparent; }
.captions .line.latest, .captions .line.partial { color: var(--text); border-left-color: var(--chan, var(--signal)); }
.captions .empty { margin: auto 0; color: var(--dim); font-size: var(--t-md); line-height: 1.5; max-width: 26em; padding-left: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
