@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/20987dd8fd1d3e9ab087a55cb90e98081c873c729c113043e0bfb1ef0f9e0bd7.ttf") format("truetype");
}

:root {
  --cor-marca: #009a44;
  --cor-sobre-marca: #000000;
  --cor-fundo: #050505;
  --cor-texto: #e8ebef;
  --fonte-titulos: "Oswald", Impact, "Arial Narrow", sans-serif;
  --fonte-texto: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --roxo: #8a06a3;
  --prata: #c9ced6;
  --heat: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--cor-texto);
  font-family: var(--fonte-texto);
  font-size: 16px;
  line-height: 1.25;
  background-color: var(--cor-fundo);
  background-image:
    radial-gradient(900px 520px at 0% 0%, color-mix(in srgb, var(--cor-marca) calc(14% + var(--heat) * 26%), transparent), transparent 70%),
    radial-gradient(900px 520px at 100% 0%, color-mix(in srgb, var(--roxo) calc(16% + var(--heat) * 30%), transparent), transparent 70%),
    linear-gradient(45deg, rgba(255, 255, 255, .028) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .028) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, .028) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .028) 75%);
  background-size: auto, auto, 6px 6px, 6px 6px;
  background-position: 0 0, 0 0, 0 0, 3px 3px;
}

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.app {
  position: relative;
  width: 100%;
  max-width: 760px;
  height: 100%;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- topo ---------- */
.topo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo { width: 52px; height: auto; flex: none; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .8)); }
.titulos { flex: 1; min-width: 0; }
h1 {
  font-family: var(--fonte-titulos);
  font-weight: 600;
  font-size: clamp(17px, 5.2vw, 28px);
  letter-spacing: .06em;
  line-height: 1.05;
  white-space: nowrap;
}
h1 span { color: var(--cor-marca); }
.slogan { margin-top: 3px; font-size: clamp(11px, 3.1vw, 16px); letter-spacing: .06em; white-space: nowrap; color: var(--prata); text-transform: uppercase; opacity: .85; }

.som { display: flex; align-items: center; gap: 6px; flex: none; }
.icone { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--prata); border: 1px solid rgba(201, 206, 214, .22); background: rgba(255, 255, 255, .04); }
.icone:hover { border-color: var(--cor-marca); }
.icone.mudo { color: #7b7f86; }
.icone.mudo::after { content: ""; position: absolute; width: 24px; height: 2px; background: var(--roxo); transform: rotate(-45deg); border-radius: 2px; }
#vol { width: 64px; accent-color: var(--cor-marca); height: 28px; }

/* ---------- palco ---------- */
.palco { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.turbina { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; align-items: center; }
.turbina::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--roxo) calc(var(--heat) * 55%), transparent), color-mix(in srgb, var(--cor-marca) calc(var(--heat) * 30%), transparent) 55%, transparent 100%);
  filter: blur(26px);
  pointer-events: none;
}
#turbo { position: relative; height: 100%; max-height: 100%; width: auto; max-width: 100%; aspect-ratio: 1 / 1; display: block; }
.status {
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  text-align: center;
  font-family: var(--fonte-titulos);
  font-weight: 600;
  font-size: clamp(15px, 4.4vw, 22px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 14px color-mix(in srgb, var(--cor-marca) 70%, transparent), 0 2px 6px #000;
  pointer-events: none;
}

.medidores { flex: none; display: flex; justify-content: center; gap: clamp(10px, 4vw, 28px); }
.medidores canvas { width: min(40vw, 17dvh, 190px); aspect-ratio: 1 / 1; height: auto; display: block; }

/* ---------- comandos ---------- */
.comandos { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }

.btn-motor {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--fonte-titulos);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .12em;
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  border: 1px solid rgba(201, 206, 214, .3);
  transition: border-color .2s, box-shadow .2s;
}
.btn-motor:hover { border-color: var(--cor-marca); }
.btn-motor .led { width: 11px; height: 11px; border-radius: 50%; background: #3a1216; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6); transition: background .2s, box-shadow .2s; }
.btn-motor.ligado { border-color: color-mix(in srgb, var(--cor-marca) 70%, transparent); }
.btn-motor.ligado .led { background: #19e57a; box-shadow: 0 0 10px 2px rgba(25, 229, 122, .7); }
.btn-motor:not(.ligado) { box-shadow: 0 0 0 0 transparent; animation: convite 2.2s ease-in-out infinite; }
@keyframes convite { 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 154, 68, 0); } 50% { box-shadow: 0 0 22px 2px rgba(0, 154, 68, .45); } }

.btn-acel {
  position: relative;
  width: 100%;
  min-height: clamp(78px, 13dvh, 118px);
  border-radius: 18px;
  font-family: var(--fonte-titulos);
  font-weight: 600;
  font-size: clamp(28px, 8vw, 44px);
  letter-spacing: .1em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 45%),
    linear-gradient(100deg, #00803a 0%, #00b552 38%, #8a06a3 100%);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .65), 0 0 calc(10px + var(--heat) * 40px) color-mix(in srgb, var(--roxo) calc(25% + var(--heat) * 60%), transparent);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform .08s, filter .15s;
}
.btn-acel.ativo { transform: translateY(3px) scale(.985); filter: brightness(1.18) saturate(1.1); box-shadow: 0 2px 10px rgba(0, 0, 0, .7), 0 0 calc(18px + var(--heat) * 50px) color-mix(in srgb, var(--roxo) 80%, transparent); }
.btn-acel:disabled { filter: grayscale(1) brightness(.45); box-shadow: none; }

.dica { text-align: center; font-size: 14px; letter-spacing: .04em; color: rgba(201, 206, 214, .75); }

/* ---------- rodapé ---------- */
.rodape { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 2px; text-align: center; }
.rodape a { color: var(--prata); font-size: 14px; letter-spacing: .04em; text-decoration: none; padding: 4px 8px; }
.rodape a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.rodape p { font-size: 12px; color: rgba(201, 206, 214, .5); }

/* ---------- telas largas (computador) ---------- */
@media (min-aspect-ratio: 5/4) and (min-height: 520px) {
  .app { max-width: 1100px; }
  .palco { flex-direction: row; align-items: stretch; gap: 20px; }
  .turbina { flex: 1.5; }
  .medidores { flex-direction: column; justify-content: center; align-items: center; gap: 12px; }
  .medidores canvas { width: min(24vw, 28dvh, 230px); }
  .comandos { flex-direction: row; align-items: center; justify-content: center; gap: 16px; }
  .btn-acel { width: min(520px, 48%); }
  .dica { display: none; }
}

/* ---------- celular deitado ou janela muito baixa: permite rolar ---------- */
@media (max-height: 520px) {
  body { overflow-y: auto; }
  .app { height: auto; min-height: 100%; }
  .turbina { min-height: 300px; flex: none; }
  .palco { flex-direction: row; }
  .medidores { flex-direction: column; justify-content: center; }
  .medidores canvas { width: 120px; }
}

@media (max-width: 440px) {
  #vol { width: 44px; }
  .icone { width: 36px; height: 36px; }
  .topo { gap: 8px; }
  .logo { width: 44px; }
  h1 { font-size: clamp(15px, 4.6vw, 20px); letter-spacing: .04em; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-motor:not(.ligado) { animation: none; }
  .btn-acel, .btn-motor { transition: none; }
}
