:root {
  --accent: #2f8fe6;
  --ink: #1d2a38;
  --muted: #6b7a8a;
  --panel: rgba(250, 251, 253, 0.78);
  --line: rgba(29, 42, 56, 0.12);
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #e8e8ea;
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}

#stage, #overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#stage { opacity: 0; transition: opacity 1.2s ease; }
body.ready #stage { opacity: 1; }
/* O canvas WebGL do Chrome cobre elementos por cima. Enquanto a tela
   Iniciar estiver aberta, o palco fica invisível. */
html:not(.no-intro) body:has(#intro:not([hidden])) #stage { opacity: 0; }
html:not(.no-intro) body:has(#intro.intro-out) #stage { opacity: 1; }

#overlay { pointer-events: none; }
.welcome-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
body.calibrating #overlay { pointer-events: auto; cursor: crosshair; }

.hud {
  position: fixed;
  top: 22px;
  left: 28px;
  letter-spacing: 0.28em;
  font-size: 12px;
  text-transform: uppercase;
  pointer-events: none;
  transition: top 0.6s ease 0.45s;
}
body.brand-docked .hud, html.no-intro .hud { top: 52px; left: 54px; }
.brand { font-weight: 600; }
.brand span { font-weight: 300; color: var(--muted); }
.status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f9dff;
  box-shadow: 0 0 8px #3f9dff;
}
.status[data-led="yellow"]::before { background: #ffc21f; box-shadow: 0 0 8px #ffc21f; }
.status[data-led="red"]::before { background: #ff2a1f; box-shadow: 0 0 8px #ff2a1f; }

.subtitle {
  position: fixed;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%) translateY(8px);
  max-width: min(760px, 70vw);
  padding: 10px 22px;
  background: rgba(20, 28, 38, 0.62);
  color: #fff;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.subtitle.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.error {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #b3261e;
  font-size: 15px;
  max-width: 520px;
  text-align: center;
}

.toggle-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3;
}

.account {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 21;
  width: min(300px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.account-bar { display: flex; align-items: center; gap: 8px; }

.cyber-logo {
  position: fixed;
  z-index: 22;
  left: var(--bx, 50%);
  top: calc(var(--by, 50%) - 46px);
  margin: 0;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  color: #2f2f2f;
  font-family: "Montserrat", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: calc(var(--bw, 468px) / 7.29635);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: 0;
  pointer-events: none;
  transition:
    top 1.05s cubic-bezier(0.77, 0, 0.18, 1),
    left 1.05s cubic-bezier(0.77, 0, 0.18, 1),
    transform 1.05s cubic-bezier(0.77, 0, 0.18, 1),
    font-size 1.05s cubic-bezier(0.77, 0, 0.18, 1);
}
body:not(.brand-docked) .cyber-logo { animation: logo-in 1.6s 0.5s cubic-bezier(0.22, 0.8, 0.2, 1) both; }
@keyframes logo-in {
  from { opacity: 0; filter: blur(12px); letter-spacing: 0.08em; }
  to { opacity: 1; filter: none; letter-spacing: 0; }
}
.cyber-logo-name {
  display: block;
  letter-spacing: 0.2em;
  margin-right: -0.2em;
  color: transparent;
  background-image: linear-gradient(100deg, #f4f7fb 34%, #8fd0ff 47%, #ffffff 50%, #8fd0ff 53%, #f4f7fb 66%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(74, 168, 255, 0.18));
  animation: name-shine 7.5s 2s ease-in-out infinite;
}
@media (max-width: 720px), (orientation: portrait) {
  .cyber-logo { left: 50%; transform: translateX(-50%); }
}
@keyframes name-shine {
  0%, 6% { background-position: 100% 0; }
  82%, 100% { background-position: 0% 0; }
}
.cyber-logo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 72%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
body.brand-docked .cyber-logo, html.no-intro .cyber-logo {
  left: 28px;
  top: 18px;
  margin: 0;
  padding-left: 26px;
  transform: none;
  font-size: 15px;
  animation: logo-flight 1.05s cubic-bezier(0.77, 0, 0.18, 1);
}
body.brand-docked .cyber-logo::before, html.no-intro .cyber-logo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  box-sizing: border-box;
  border: 1.5px solid #d7ecff;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #4aa8ff,
    0 0 8px 1px rgba(74, 168, 255, 0.9),
    0 0 16px 2px rgba(47, 143, 230, 0.45),
    inset 0 0 5px rgba(180, 220, 255, 0.7);
  pointer-events: none;
}
body.brand-docked .cyber-logo-name, html.no-intro .cyber-logo-name {
  letter-spacing: 0.2em;
  margin-right: 0;
  color: #2f2f2f;
  -webkit-text-fill-color: #2f2f2f;
  background: none;
  filter: none;
  animation: none;
  transition: color 0.7s ease, -webkit-text-fill-color 0.7s ease;
}
/* escolha de idioma ainda sobre a abertura escura: logo claro no canto */
body.brand-docked:has(#intro:not([hidden]):not(.intro-out)) .cyber-logo-name {
  color: var(--frost);
  -webkit-text-fill-color: var(--frost);
}
body.brand-docked .cyber-logo {
  pointer-events: auto;
  cursor: pointer;
}
body.brand-docked .cyber-logo::after, html.no-intro .cyber-logo::after {
  left: 26px;
  animation: logo-line 0.55s 0.72s ease forwards;
}
html.no-intro .cyber-logo, html.no-intro .cyber-logo::after { animation: none; transition: none; }
html.no-intro .cyber-logo::after { opacity: 1; transform: none; }
@keyframes logo-flight {
  0% { text-shadow: none; filter: none; }
  42% { text-shadow: 0 0 22px rgba(47, 143, 230, 0.75); filter: blur(0.6px); }
  100% { text-shadow: 0 0 10px rgba(47, 143, 230, 0.28); filter: none; }
}
@keyframes logo-line {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}
.account-bar .choice {
  width: auto;
  min-height: 44px;
  animation: none;
}
.mute-btn {
  padding: 10px 16px 10px 14px;
  gap: 10px;
  color: var(--ink);
}
.mute-btn svg { width: 16px; height: 16px; display: block; }
.mute-btn .icon-off { display: none; }
.mute-btn.muted .icon-on { display: none; }
.mute-btn.muted .icon-off { display: block; }
.account-toggle {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
}
.account-bar .choice:hover,
.account-bar .choice:focus-visible {
  background: rgba(47, 143, 230, 0.88);
  border-color: rgba(47, 143, 230, 0.9);
  color: #fff;
}
.account-bar .choice:hover .diamond,
.account-bar .choice:focus-visible .diamond {
  border-color: #fff;
  background: transparent;
}
/* Login: modal central. Entrada: anel do LED se desenha, o painel abre a partir de
   uma linha, a varredura desce, os cantos encaixam e o conteudo sobe em sequencia. */
.account:has(#accountCard:not([hidden])) { z-index: 40; }
.account-scrim {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10, 20, 34, 0.5), rgba(4, 6, 10, 0.8));
  backdrop-filter: blur(7px) saturate(0.85);
  -webkit-backdrop-filter: blur(7px) saturate(0.85);
  opacity: 0;
}
.account-scrim[hidden], .account-card[hidden] { display: none; }
.account-scrim.open { animation: ac-fade 0.45s ease forwards; }
.account-scrim.closing { animation: ac-fade-out 0.36s ease forwards; }
.account-card {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(400px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ac-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  fill: none;
  opacity: 0;
  overflow: visible;
}
.ac-ring circle {
  stroke: #4aa8ff;
  stroke-width: 2;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  filter: drop-shadow(0 0 6px #4aa8ff);
}
.ac-ring .ac-ring-dash { stroke-width: 1; stroke-dasharray: 3 7; stroke-dashoffset: 0; opacity: 0.6; }
.account-card.open .ac-ring { animation: ac-ring 1s cubic-bezier(0.6, 0, 0.2, 1) forwards; }
.account-card.open .ac-ring circle:first-child { animation: ac-draw 0.5s 0.05s ease-out forwards; }
.ac-panel {
  position: relative;
  pointer-events: auto;
  padding: 30px 28px 24px;
  color: #e8f1fb;
  background: linear-gradient(160deg, rgba(14, 24, 38, 0.95), rgba(6, 10, 16, 0.97));
  border: 1px solid rgba(90, 160, 230, 0.35);
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(74, 168, 255, 0.06), 0 0 46px rgba(47, 143, 230, 0.2);
  clip-path: inset(50% 50% 50% 50%);
  overflow: hidden;
}
.account-card.open .ac-panel { clip-path: inset(0 0 0 0); animation: ac-open 0.62s 0.42s cubic-bezier(0.77, 0, 0.18, 1) both; }
.account-card.closing .ac-panel { animation: ac-close 0.36s ease forwards; }
.ac-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(150, 205, 255, 0.035) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.ac-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9cd4ff, transparent);
  box-shadow: 0 0 16px 2px rgba(74, 168, 255, 0.7);
  opacity: 0;
  pointer-events: none;
}
.account-card.open .ac-scan { animation: ac-scan 1.05s 0.95s ease-in-out both; }
.account-card.checking .ac-scan { animation: ac-scan 0.9s ease-in-out infinite; }
.ac-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 0 solid #4aa8ff;
  opacity: 0;
  pointer-events: none;
}
.ac-corner.tl { left: 9px; top: 9px; border-left-width: 1.5px; border-top-width: 1.5px; --cx: -10px; --cy: -10px; }
.ac-corner.tr { right: 9px; top: 9px; border-right-width: 1.5px; border-top-width: 1.5px; --cx: 10px; --cy: -10px; }
.ac-corner.bl { left: 9px; bottom: 9px; border-left-width: 1.5px; border-bottom-width: 1.5px; --cx: -10px; --cy: 10px; }
.ac-corner.br { right: 9px; bottom: 9px; border-right-width: 1.5px; border-bottom-width: 1.5px; --cx: 10px; --cy: 10px; }
.account-card.open .ac-corner { animation: ac-corner 0.5s 0.9s cubic-bezier(0.22, 0.8, 0.2, 1) both; }
.ac-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: rgba(200, 220, 245, 0.7);
  background: transparent;
  border: 0;
}
.ac-close:hover, .ac-close:focus-visible { color: #fff; outline: none; }
.ac-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #4aa8ff;
  font-family: Bahnschrift, "Segoe UI", sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
}
.ac-eyebrow .diamond { width: 7px; height: 7px; border-color: #4aa8ff; }
#accountEyebrow { display: inline-block; overflow: hidden; white-space: nowrap; }
.account-card.open #accountEyebrow { animation: ac-type 0.75s 1s steps(24) both; }
.ac-title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: #fff;
}
.account-card.open .ac-title { animation: ac-title 0.8s 1.05s cubic-bezier(0.22, 0.8, 0.2, 1) both; }
.ac-lead { margin: 0 0 22px; font-size: 13px; line-height: 1.5; color: rgba(200, 220, 245, 0.72); }
.account-card .ac-form input {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: #e8f1fb;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(90, 160, 230, 0.28);
  border-radius: 3px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.account-card .ac-form input::placeholder { color: rgba(200, 220, 245, 0.45); }
.account-card .ac-form input:focus {
  outline: none;
  background: rgba(74, 168, 255, 0.06);
  border-color: #4aa8ff;
  box-shadow: 0 0 0 3px rgba(74, 168, 255, 0.14), 0 0 18px rgba(74, 168, 255, 0.18);
}
.account-submit {
  width: 100%;
  margin-top: 4px;
  padding: 12px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 0 26px rgba(47, 143, 230, 0.35);
}
.account-card.checking .account-submit { animation: ac-pulse 0.9s ease-in-out infinite; }
.ac-msg {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  color: #9cc8ff;
  opacity: 0;
  transition: max-height 0.35s ease, margin 0.35s ease, opacity 0.35s ease;
}
.ac-msg.show { max-height: 64px; margin-top: 12px; opacity: 1; }
.account-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: rgba(200, 220, 245, 0.5);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.account-or::before, .account-or::after { content: ""; flex: 1; height: 1px; background: rgba(90, 160, 230, 0.22); }
.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  font-size: 13px;
  color: #e8f1fb;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(90, 160, 230, 0.28);
}
.google-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: #4aa8ff; }
.ac-lead, .ac-form > *, .account-or, .google-btn { opacity: 0; }
.account-card.open .ac-lead { animation: ac-rise 0.5s 1.2s ease-out both; }
.account-card.open .ac-form > :nth-child(1) { animation: ac-rise 0.5s 1.3s ease-out both; }
.account-card.open .ac-form > :nth-child(2) { animation: ac-rise 0.5s 1.38s ease-out both; }
.account-card.open .ac-form > :nth-child(3) { animation: ac-rise 0.5s 1.46s ease-out both; }
.account-card.open .account-or { animation: ac-rise 0.5s 1.54s ease-out both; }
.account-card.open .google-btn { animation: ac-rise 0.5s 1.62s ease-out both; }
@keyframes ac-fade { to { opacity: 1; } }
@keyframes ac-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ac-draw { to { stroke-dashoffset: 0; } }
@keyframes ac-ring {
  0% { opacity: 0; transform: scale(0.55) rotate(-90deg); }
  18% { opacity: 1; }
  48% { opacity: 1; transform: scale(1) rotate(0deg); }
  100% { opacity: 0; transform: scale(3.4) rotate(40deg); }
}
@keyframes ac-open {
  0% { clip-path: inset(50% 50% 50% 50%); }
  40% { clip-path: inset(calc(50% - 1px) 0 calc(50% - 1px) 0); }
  100% { clip-path: inset(0 0 0 0); }
}
@keyframes ac-close {
  0% { clip-path: inset(0 0 0 0); opacity: 1; }
  60% { clip-path: inset(calc(50% - 1px) 0 calc(50% - 1px) 0); opacity: 1; }
  100% { clip-path: inset(50% 50% 50% 50%); opacity: 0; }
}
@keyframes ac-scan {
  0% { top: 0; opacity: 0; }
  12%, 88% { opacity: 1; }
  100% { top: calc(100% - 2px); opacity: 0; }
}
@keyframes ac-corner {
  from { opacity: 0; transform: translate(var(--cx), var(--cy)); }
  to { opacity: 1; transform: none; }
}
@keyframes ac-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ac-title {
  from { opacity: 0; letter-spacing: 0.32em; filter: blur(8px); }
  to { opacity: 1; letter-spacing: 0.01em; filter: none; }
}
@keyframes ac-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes ac-pulse { 50% { box-shadow: 0 0 40px rgba(74, 168, 255, 0.7); } }
@media (prefers-reduced-motion: reduce) {
  .account-card *, .account-scrim { animation: none !important; }
  .account-scrim.open, .ac-lead, .ac-form > *, .account-or, .google-btn, .ac-corner { opacity: 1; }
  .account-card.open .ac-panel { clip-path: none; }
  .ac-ring { display: none; }
}
.google-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 5px, transparent 6px),
    conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0 100%);
  color: #4285f4;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.panel {
  position: fixed;
  top: 60px;
  right: 18px;
  bottom: 18px;
  width: 330px;
  overflow-y: auto;
  padding: 6px 18px 18px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
  z-index: 2;
}
body.panel-hidden .panel { transform: translateX(110%); opacity: 0; visibility: hidden; }

section, details {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
details:last-child { border-bottom: 0; }

h2, summary {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: default;
}
summary { cursor: pointer; margin: 0; }
details[open] summary { margin-bottom: 10px; }
h2 small { font-weight: 300; letter-spacing: 0.05em; text-transform: none; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.six { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

button, .file, select, textarea, input[type="text"], input[type="password"] {
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 7px 10px;
}
button, .file {
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}
button:hover, .file:hover { border-color: var(--accent); }
button.active, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.led-blue.active { background: #2f8fe6; border-color: #2f8fe6; }
button.led-yellow.active { background: #e0a400; border-color: #e0a400; }
button.led-red.active { background: #d8261c; border-color: #d8261c; }

.file input { display: none; }

textarea, select, input[type="text"], input[type="password"] { width: 100%; margin-bottom: 8px; resize: vertical; box-sizing: border-box; }
.field { display: block; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.field input { margin-top: 3px; margin-bottom: 0; }

.slider {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.slider input { width: 100%; accent-color: var(--accent); }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 6px 0;
}
.check input { accent-color: var(--accent); }

.hint { font-size: 11px; color: var(--muted); margin: 0 0 6px; }

#manual { margin-bottom: 8px; }

/* ---------- Jornada CyberLife ---------- */
.journey {
  position: fixed;
  right: max(4vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  width: min(380px, 40vw);
  z-index: 1;
  pointer-events: none;
}
.journey.show { pointer-events: auto; }
body:not(.panel-hidden) .journey { right: 370px; }

.choices, .range-options { display: flex; flex-direction: column; gap: 10px; }

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 12px 22px 12px 18px;
  text-align: left;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(29, 42, 56, 0.1);
  animation: choice-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}
.choice:hover, .choice:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent);
  transform: translateX(-4px);
  outline: none;
}
.choice.primary { background: rgba(47, 143, 230, 0.88); border-color: rgba(47, 143, 230, 0.9); color: #fff; }
.choice.primary:hover, .choice.primary:focus-visible { background: var(--accent); }
.choice:active { transform: scale(0.98); }

.diamond {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
  transition: background 0.2s;
}
.choice:hover .diamond { background: var(--accent); }
.choice.primary .diamond { border-color: #fff; }
.choice.primary:hover .diamond { background: #fff; }
.diamond.play {
  width: 0;
  height: 0;
  margin-left: 1px;
  border: 0;
  border-left: 10px solid var(--accent);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: none;
}
.choice:hover .diamond.play { background: none; filter: drop-shadow(0 0 4px rgba(47, 143, 230, 0.8)); }

/* filmes da home: o overlay cresce a partir do botao clicado */
.film {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: #000;
}
.film.show {
  display: block;
  animation: film-in 0.6s cubic-bezier(0.7, 0, 0.2, 1) both;
}
.film.out { animation: film-out 0.45s ease both; }
.film iframe { width: 100%; height: 100%; border: 0; display: block; }
.film-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 1;
  width: auto;
  min-height: 38px;
  padding: 8px 18px 8px 14px;
  font-size: 12px;
  color: #e8f1fb;
  background: rgba(4, 10, 20, 0.55);
  border-color: rgba(74, 168, 255, 0.45);
  box-shadow: none;
  opacity: 0;
  animation: none;
  transition: opacity 0.3s, background 0.2s, border-color 0.2s;
}
.film:hover .film-close, .film-close:focus-visible { opacity: 1; }
.film-close:hover { background: rgba(4, 10, 20, 0.8); transform: none; }
@media (hover: none) { .film-close { opacity: 0.85; } }
@keyframes film-in {
  from { clip-path: circle(0 at var(--fx, 50%) var(--fy, 50%)); }
  to { clip-path: circle(150vmax at var(--fx, 50%) var(--fy, 50%)); }
}
@keyframes film-out {
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .film.show, .film.out { animation: none; }
}

@keyframes choice-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

.form-card {
  padding: 20px 22px 22px;
  background: rgba(250, 251, 253, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  box-shadow: 0 10px 34px rgba(29, 42, 56, 0.12);
  animation: choice-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.form-step {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-progress { height: 2px; margin: 10px 0 16px; background: var(--line); }
.form-progress span { display: block; height: 100%; background: var(--accent); transition: width 0.4s ease; }
.form-label { display: block; font-size: 17px; margin-bottom: 12px; }
.form-card input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.form-card input:focus { outline: none; border-color: var(--accent); }
.form-card.invalid input { border-color: #e0a400; animation: shake 0.35s; }
.form-submit { width: 100%; min-height: 46px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.form-card .choice { box-shadow: none; }

.summary dl { margin: 14px 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; word-break: break-word; }

@keyframes shake {
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- Abertura: tela escura de lancamento ----------
   --bx/--bw posicionam a coluna da marca; o logo (#cyberLogo, fora da intro)
   usa os mesmos valores para pousar exatamente no espaco reservado. */
:root {
  --bx: 56vw;
  --bw: min(500px, 36vw);
  --by: 50%;
  --night: #04060a;
  --frost: #eef3f8;
}
.intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background: var(--night);
  color: var(--frost);
}
html.no-intro .intro, .intro[hidden] { display: none; }
#introVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 50%;
  pointer-events: none;
  filter: saturate(0.78) contrast(1.08) brightness(0.82);
  opacity: 0;
  transform: scale(1.08);
  animation: intro-video-in 2.6s 0.1s ease forwards, intro-drift 28s ease-in-out infinite alternate;
}
@keyframes intro-video-in { to { opacity: 1; } }
@keyframes intro-drift {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.2%, -0.6%, 0); }
}
.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 6, 10, 0) 26%, rgba(4, 6, 10, 0.5) 46%, rgba(4, 6, 10, 0.86) 70%, rgba(4, 6, 10, 0.94) 100%),
    linear-gradient(180deg, rgba(4, 6, 10, 0.6) 0%, rgba(4, 6, 10, 0) 24%, rgba(4, 6, 10, 0) 68%, rgba(4, 6, 10, 0.9) 100%),
    radial-gradient(130% 100% at 24% 45%, rgba(4, 6, 10, 0) 50%, rgba(4, 6, 10, 0.55) 100%);
}

.intro-chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(238, 243, 248, 0.5);
  animation: intro-rise 1s 1.2s ease both;
}
/* linhas de varredura bem sutis por cima do video */
.intro-chrome::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
}
/* fio vertical que ancora a coluna da marca */
.intro-chrome::after {
  content: "";
  position: absolute;
  left: calc(var(--bx) - 40px);
  top: calc(var(--by) - 150px);
  width: 1px;
  height: 300px;
  background: linear-gradient(180deg, transparent, rgba(74, 168, 255, 0.7) 40%, rgba(74, 168, 255, 0.7) 60%, transparent);
}
.ic-status {
  position: absolute;
  left: 54px;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ic-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4aa8ff;
  box-shadow: 0 0 10px #4aa8ff, 0 0 2px #d7ecff;
  animation: ic-pulse 2.6s ease-in-out infinite;
}
.ic-status b { font-weight: 400; color: rgba(238, 243, 248, 0.28); margin-left: 8px; }
.ic-langs {
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ic-langs em { width: 3px; height: 3px; transform: rotate(45deg); background: rgba(74, 168, 255, 0.8); }
@keyframes ic-pulse { 50% { opacity: 0.35; box-shadow: 0 0 4px #4aa8ff; } }
@keyframes intro-rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.intro-swap {
  position: absolute;
  z-index: 3;
  left: var(--bx);
  top: calc(var(--by) - 104px);
  width: var(--bw);
}
#introWelcome > * { animation: intro-rise 0.9s cubic-bezier(0.22, 0.8, 0.2, 1) both; }
#introWelcome > .intro-eyebrow { animation-delay: 0.35s; }
#introWelcome > .intro-rule { animation-delay: 0.75s; }
#introWelcome > .intro-lead { animation-delay: 0.9s; }
#introWelcome > #startJourney { animation-delay: 1.05s; }
.intro-eyebrow {
  margin: 0;
  height: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Bahnschrift, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #7cc4ff;
}
.intro-eyebrow .diamond { width: 7px; height: 7px; border-color: #7cc4ff; border-width: 1px; }
.intro-eyebrow-sep { width: 22px; height: 1px; background: rgba(124, 196, 255, 0.5); }
.intro-logo-slot { margin-top: 42px; height: calc(var(--bw) * 0.1124); }
.intro-rule {
  position: relative;
  margin-top: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(238, 243, 248, 0.42), rgba(238, 243, 248, 0.08) 70%, transparent);
}
.intro-rule span {
  position: absolute;
  left: 0;
  top: -2px;
  width: 64px;
  height: 5px;
  background: linear-gradient(90deg, #4aa8ff, transparent);
  filter: blur(2px);
  animation: rule-run 4.8s 2s ease-in-out infinite;
}
@keyframes rule-run {
  0% { transform: translateX(-20px); opacity: 0; }
  15% { opacity: 1; }
  70%, 100% { transform: translateX(calc(var(--bw) - 40px)); opacity: 0; }
}
.intro-lead {
  margin: 22px 0 0;
  max-width: 30em;
  text-wrap: balance;
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: rgba(238, 243, 248, 0.72);
}
.intro-lead strong { font-weight: 500; color: var(--frost); }
#introTagline { margin: 16px 0 0; color: #ffb4ab; font-size: 13px; line-height: 1.45; }
#introTagline:empty { display: none; }

/* botoes de vidro da abertura */
.intro .choice {
  position: relative;
  overflow: hidden;
  color: var(--frost);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(238, 243, 248, 0.2);
  border-radius: 2px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.intro .choice:hover, .intro .choice:focus-visible {
  transform: none;
  background: rgba(47, 143, 230, 0.16);
  border-color: rgba(124, 196, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(74, 168, 255, 0.25), 0 12px 40px rgba(47, 143, 230, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  outline: none;
}
.intro .choice .diamond { border-color: #7cc4ff; }
.intro .choice:hover .diamond, .intro .choice:focus-visible .diamond { background: #7cc4ff; box-shadow: 0 0 10px #4aa8ff; }
.intro .choice:active { transform: scale(0.985); }
/* reflexo que atravessa o botao principal de tempos em tempos */
#startJourney::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-18deg);
  animation: cta-sheen 5.5s 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cta-sheen {
  0% { left: -40%; }
  28%, 100% { left: 130%; }
}
#startJourney {
  width: auto;
  min-height: 54px;
  margin-top: 34px;
  padding: 0 26px 0 22px;
  gap: 16px;
  font-family: Bahnschrift, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.intro-arrow { width: 20px; height: 10px; margin-left: 8px; transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.2, 1); }
#startJourney:hover .intro-arrow, #startJourney:focus-visible .intro-arrow { transform: translateX(6px); }

.intro-pane { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.8, 0.2, 1), filter 0.6s ease; }
#introLangs {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  pointer-events: none;
}
.intro.is-langs #introWelcome {
  opacity: 0;
  transform: translateY(-12px);
  filter: blur(6px);
  pointer-events: none;
}
.intro.is-langs #introLangs {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}
.intro-lang {
  animation: none;
  gap: 16px;
  min-height: 56px;
  padding: 0 20px;
  font-size: 15px;
  letter-spacing: 0.06em;
  pointer-events: none;
}
.intro-lang svg { width: 22px; height: 16px; border-radius: 1px; flex: none; opacity: 0.92; }
.intro-lang .choice-label { flex: 1; }
.lang-code {
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(238, 243, 248, 0.4);
  transition: color 0.3s;
}
.intro-lang:hover .lang-code, .intro-lang:focus-visible .lang-code { color: #7cc4ff; }
.intro.is-langs .intro-lang { animation: choice-in 0.55s cubic-bezier(0.22, 0.8, 0.2, 1) both; pointer-events: auto; }
.intro.is-langs .intro-lang:nth-child(2) { animation-delay: 90ms; }
.intro.is-langs .intro-lang:nth-child(3) { animation-delay: 180ms; }
.intro-lang.selected { border-color: rgba(124, 196, 255, 0.75); box-shadow: inset 2px 0 0 #4aa8ff; }
.intro-lang-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 26px;
  font-family: Bahnschrift, "Segoe UI", sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(238, 243, 248, 0.45);
}
.intro-lang-title span:first-child { font-family: "Segoe UI", sans-serif; font-size: 26px; font-weight: 300; letter-spacing: 0.02em; text-transform: none; color: var(--frost); margin-bottom: 6px; }
.intro-lang-list { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }

/* enquanto a abertura escura esta na tela, os controles fixos viram vidro escuro */
body:has(#intro:not([hidden]):not(.intro-out)) .account-bar .choice {
  color: var(--frost);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(238, 243, 248, 0.16);
  box-shadow: none;
}
body:has(#intro:not([hidden]):not(.intro-out)) .account-bar .choice .diamond { border-color: #7cc4ff; }
body:has(#intro:not([hidden]):not(.intro-out)) .account-bar .choice:hover {
  background: rgba(47, 143, 230, 0.22);
  border-color: rgba(124, 196, 255, 0.75);
}

@media (max-width: 720px), (orientation: portrait) {
  :root { --bw: min(400px, 84vw); --by: 64%; }
  #introVideo { object-position: 22% 50%; }
  .intro::before {
    background:
      linear-gradient(180deg, rgba(4, 6, 10, 0.5) 0%, rgba(4, 6, 10, 0) 22%, rgba(4, 6, 10, 0.55) 48%, rgba(4, 6, 10, 0.94) 72%, var(--night) 100%);
  }
  .intro-swap { left: 50%; transform: translateX(-50%); text-align: center; }
  .intro-chrome::after, .ic-langs { display: none; }
  .ic-status { left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom)); white-space: nowrap; }
  .ic-status b { display: none; }
  .intro-eyebrow { justify-content: center; letter-spacing: 0.26em; font-size: 10px; }
  .intro-rule { background: linear-gradient(90deg, transparent, rgba(238, 243, 248, 0.4), transparent); }
  .intro-lead { margin-inline: auto; }
  #startJourney { margin-inline: auto; }
  .intro .choice { justify-content: center; }
  .intro-lang .choice-label { flex: none; }
  .intro-lang-list { margin-inline: auto; }
}

.site-credit {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 23;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}
.site-social { display: flex; justify-content: center; align-items: center; gap: 8px; pointer-events: auto; }
.site-copy {
  display: block;
  padding: 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.site-copy:hover, .site-copy:focus-visible { color: var(--accent); outline: none; }
body:has(#intro:not([hidden]):not(.intro-out)) .site-copy { color: rgba(238, 243, 248, 0.55); }
body:has(#intro:not([hidden]):not(.intro-out)) .site-copy:hover { color: #fff; }
@media (max-width: 520px) { .site-copy { font-size: 9px; letter-spacing: 0.1em; } }
.intro::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 46%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 143, 230, 0.95), transparent);
  transform: scaleX(0.15);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
}
.intro.is-langs::after { animation: intro-sweep 0.9s ease; }
.intro.intro-out { animation: intro-dissolve 0.72s ease forwards; }
/* saida: a cena clareia em direcao a sala branca da Chloe */
.intro.intro-out #introVideo { filter: saturate(0.4) brightness(1.7) blur(6px); transition: filter 0.72s ease; }
.intro.intro-out::after { animation: intro-sweep 0.72s ease; }

@keyframes intro-sweep {
  0% { transform: scaleX(0.15); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes intro-dissolve {
  0% { opacity: 1; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-pane, .intro.intro-out, .intro.is-langs .intro-lang, .cyber-logo, .cyber-logo::after, .cyber-logo-name { transition: none; animation: none; filter: none; }
  #introVideo { animation: none; opacity: 1; transform: none; }
  #introWelcome > *, .intro-chrome, .intro-rule span, #startJourney::after, body:not(.brand-docked) .cyber-logo { animation: none; }
}

@media (max-width: 720px), (orientation: portrait) {
  .journey, body:not(.panel-hidden) .journey {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: calc(78px + env(safe-area-inset-bottom));
    transform: none;
    width: auto;
  }
  .subtitle { bottom: auto; top: 76px; width: calc(100vw - 28px); max-width: none; font-size: 10px; }
  .choices { gap: 8px; }
  .choice { min-height: 46px; font-size: 14px; }
  .panel { left: 18px; width: auto; }
}
