@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-Bold.woff2') format('woff2');
}

:root {
  --exp-bg: #080b11;
  --exp-cyan: #00f0ff;
  --exp-cyan-glow: rgba(0, 240, 255, 0.4);
  --exp-text: #e2e8f0;
  --exp-muted: #8b9bb4;
  --exp-border: rgba(255, 255, 255, 0.15);
  --exp-surface: rgba(8, 11, 17, 0.65);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--exp-bg);
  color: var(--exp-text);
  font-family: 'JetBrains Mono', monospace, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.exp-viewport {
  position: relative;
  width: 100vw;
  background: var(--exp-bg);
}

.exp-video-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background: var(--exp-bg);
  overflow: hidden;
}

.exp-video-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.exp-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(8, 11, 17, 0.85) 100%);
  pointer-events: none;
}

.exp-dots-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.45;
  pointer-events: none;
}

.exp-hud-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 44px;
}

.hud-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--exp-muted);
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.hud-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-transform: uppercase;
}

.hud-sub-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-dim {
  opacity: 0.5;
  font-size: 0.7rem;
}

.hud-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: 380px;
}

/* Language switcher (plugin lds_lang_switcher, plain links) */
.hud-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.hud-lang .hud-lang-link {
  pointer-events: auto;
  color: var(--exp-muted);
  text-decoration: none;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--exp-border);
  background: rgba(8, 11, 17, 0.7);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hud-lang .hud-lang-link:hover,
.hud-lang .hud-lang-link:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.hud-lang .hud-lang-link.is-current,
.hud-lang .hud-lang-link[aria-current="page"] {
  color: var(--exp-cyan);
  border-color: rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 8px var(--exp-cyan-glow);
}

.hud-manifesto {
  max-width: 380px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hud-manifesto-badge {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: #ffffff;
  font-weight: 700;
}

.hud-manifesto p {
  margin: 0;
  line-height: 1.55;
  color: #cbd5e1;
}

.hud-floating-data {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  border-right: 1px solid var(--exp-border);
  padding-right: 12px;
  font-size: 0.7rem;
  line-height: 1.4;
  opacity: 0.75;
}

.hud-coord-group {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.hud-target-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--exp-cyan);
}

.hud-reticle { font-weight: bold; }

.hud-center-captions {
  position: absolute;
  top: 50%;
  left: 6%;
  transform: translate(var(--cap-tx, 0), var(--cap-ty, -50%));
  width: min(520px, 88vw);
  max-width: 520px;
  min-height: 220px;
}

/* Layout presets (LDS layout fields). Only the container moves; GSAP animates
   .hud-caption-step, never this box. No width/top/left animation (decision 0021). */
.hud-captions--w-sm { width: min(380px, 88vw); max-width: 380px; }
.hud-captions--w-md { width: min(520px, 88vw); max-width: 520px; }
.hud-captions--w-lg { width: min(680px, 88vw); max-width: 680px; }

.hud-captions--x-left   { left: 6%; right: auto; --cap-tx: 0; }
.hud-captions--x-center { left: 50%; right: auto; --cap-tx: -50%; }
.hud-captions--x-right  { left: auto; right: 6%; --cap-tx: 0; }

.hud-captions--y-middle { top: 50%; bottom: auto; --cap-ty: -50%; }
/* top: below the brand block (brand + sub-lines ~ 110px tall + padding) */
.hud-captions--y-top    { top: 22vh; bottom: auto; --cap-ty: 0; }
/* bottom: above .hud-bottom (progress/telemetry bar) */
.hud-captions--y-bottom { top: auto; bottom: 120px; --cap-ty: 0; }
.hud-captions--y-bottom .hud-caption-step { top: auto; bottom: 0; }

.hud-caption-step {
  opacity: 0;
  transform: translateY(24px);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px 28px;
  background: var(--exp-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--exp-border);
  border-left: 3px solid var(--exp-cyan);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.hud-caption-step.active {
  opacity: 1;
  transform: translateY(0);
}

.hud-step-tag {
  color: var(--exp-cyan);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.hud-caption-step h2 {
  font-size: 2.1rem;
  margin: 0 0 10px 0;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.hud-caption-step p {
  margin: 0 0 16px 0;
  line-height: 1.6;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.hud-metric-row {
  display: flex;
  gap: 16px;
  font-size: 0.68rem;
  color: var(--exp-cyan);
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.hud-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hud-link {
  pointer-events: auto;
  display: inline-block;
  color: var(--exp-cyan);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 8px 16px;
  background: rgba(8, 11, 17, 0.75);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.hud-link:hover {
  background: var(--exp-cyan);
  color: #080b11;
  box-shadow: 0 0 16px var(--exp-cyan-glow);
}

.hud-sound-status {
  font-size: 0.72rem;
  opacity: 0.65;
}

.hud-speaker-icon { color: var(--exp-cyan); }

.hud-progress-wrapper {
  flex-grow: 1;
  max-width: 320px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
  overflow: hidden;
}

.hud-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--exp-cyan);
  box-shadow: 0 0 8px var(--exp-cyan);
}

.hud-telemetry {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  background: rgba(8, 11, 17, 0.7);
  padding: 8px 14px;
  border: 1px solid var(--exp-border);
  backdrop-filter: blur(8px);
}

.hud-divider { opacity: 0.25; }

.hud-nominal {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4ade80;
}

.hud-status-led {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
}

.exp-scroll-track {
  position: relative;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

.exp-fade-gate {
  position: fixed;
  inset: 0;
  background: var(--exp-bg);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

@media (max-width: 768px) {
  .exp-hud-layer { padding: 20px 18px; }
  .hud-top { flex-direction: column; gap: 14px; }
  .hud-top-right { max-width: 100%; align-items: flex-start; }
  .hud-manifesto { max-width: 100%; text-align: left; align-items: flex-start; }
  .hud-manifesto-badge { font-size: 0.65rem; }
  .hud-manifesto p { font-size: 0.72rem; }
  .hud-floating-data { display: none; }
  .hud-center-captions { left: 18px; right: 18px; width: auto; max-width: calc(100vw - 36px); }
  /* Mobile: every layout option collapses to the standard mobile layout
     (left/right 18px, auto width, vertically centered). */
  .hud-center-captions[class*="hud-captions--"] {
    left: 18px; right: 18px; top: 50%; bottom: auto;
    width: auto; max-width: calc(100vw - 36px);
    --cap-tx: 0; --cap-ty: -50%;
  }
  .hud-center-captions[class*="hud-captions--"] .hud-caption-step { top: 0; bottom: auto; }
  .hud-caption-step h2 { font-size: 1.45rem; }
  .hud-bottom { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  html.lds-selection-active:not(.lds-layout-preview) .exp-hud-layer,
  html:not(.lds-layout-preview) body.lds-editing .exp-hud-layer,
  html:not(.lds-layout-preview) body.lds-active .exp-hud-layer { padding: 20px 18px 120px; }
  .hud-telemetry { justify-content: space-between; font-size: 0.68rem; }
  .hud-progress-wrapper { max-width: 100%; margin-bottom: 0; }
}


/* ===== Luma Digital Studio: campos de conteudo editavel ===== */

.hud-manifesto .lds-richtext {
  text-align: right;
}

.hud-manifesto .lds-richtext p {
  margin: 0;
  line-height: 1.55;
  color: #cbd5e1;
}

.hud-caption-step .lds-field,
.hud-brand .lds-field,
.hud-metric-row .lds-field,
.hud-exit .lds-field {
  display: inline;
}

/* ========================================================
   FIX LDS: Liberar clique e edicao inline de textos
   ======================================================== */

.hud-brand,
.hud-manifesto,
.hud-caption-step,
.hud-exit,
.hud-sound-status,
.lds-field,
.lds-richtext,
.lds-button,
[data-lds-field],
[data-pencilino-field] {
  pointer-events: auto !important;
  cursor: pointer;
}

/* Campos inline herdam a cor e estilo do pai */
.hud-manifesto .lds-richtext {
  text-align: right;
}
.hud-manifesto .lds-richtext p {
  margin: 0;
  line-height: 1.55;
  color: #cbd5e1;
}
.hud-caption-step .lds-field,
.hud-brand .lds-field,
.hud-metric-row .lds-field {
  display: inline;
}

/* Quando o editor LDS estiver aberto, mantem os cards visiveis para edicao
   (nao se aplica com o painel de layout aberto: html.lds-layout-preview) */
html.lds-selection-active:not(.lds-layout-preview) .hud-caption-step,
html:not(.lds-layout-preview) body.lds-editing .hud-caption-step,
html:not(.lds-layout-preview) body.lds-active .hud-caption-step {
  position: relative !important;
  opacity: 1 !important;
  transform: none !important;
  margin-bottom: 20px !important;
  pointer-events: auto !important;
}

html.lds-selection-active:not(.lds-layout-preview) .hud-center-captions,
html:not(.lds-layout-preview) body.lds-editing .hud-center-captions,
html:not(.lds-layout-preview) body.lds-active .hud-center-captions {
  position: static !important;
  transform: none !important;
  margin-top: 140px !important;
  z-index: 100 !important;
}

/* Previa do layout: mostra so o passo 1, como o visitante ve a caixa */
html.lds-layout-preview .hud-caption-step { opacity: 0 !important; visibility: hidden; }
html.lds-layout-preview .hud-caption-step[data-step="1"] {
  visibility: visible;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

/* Edit mode scroll (rule 14): the HUD layer stops being fixed and grows with its
   content, scrolling with the page (the 500vh scroll track gives room). Bottom
   padding keeps the plugin editor bar from covering the footer fields.
   Not applied with the layout preview open: html.lds-layout-preview */
html.lds-selection-active:not(.lds-layout-preview) .exp-hud-layer,
html:not(.lds-layout-preview) body.lds-editing .exp-hud-layer,
html:not(.lds-layout-preview) body.lds-active .exp-hud-layer {
  position: absolute !important;
  inset: auto !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: auto !important;
  min-height: 100vh !important;
  padding-bottom: 120px !important;
}


/* ===== Landing end buttons (decision 0046) =====
   Two .hud-link buttons shown at the end of the scroll (JS toggles .is-visible
   at progress >= 0.985). Only opacity/visibility change; nothing is animated
   with pointer-events: none. In edit mode they are always visible, in flow. */
.hud-end {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: max-content;
  max-width: calc(100vw - 36px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.hud-end.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0s;
}

.hud-end .hud-link { pointer-events: auto; }

.hud-exit .hud-link { pointer-events: auto; }

@media (max-width: 768px) {
  .hud-end { flex-direction: column; align-items: stretch; text-align: center; }
}

html.lds-selection-active .hud-end,
html.lds-editing .hud-end,
body.lds-editing .hud-end,
body.lds-active .hud-end {
  position: static;
  transform: none;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none;
  margin: 20px 0 0;
  width: auto;
  justify-content: flex-start;
}


/* ===== Manifesto backing on phones =====
   Same look as the caption cards (.hud-caption-step): background, blur, border.
   Below 768px only; desktop is unchanged. No pointer-events change, no animation. */
@media (max-width: 767.98px) {
  .hud-manifesto {
    padding: 12px 14px;
    background: var(--exp-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--exp-border);
    border-left: 3px solid var(--exp-cyan);
    width: 100%;
  }
  /* Hidden while a step card OR the end buttons are on screen (JS toggles .is-steps / .is-end
     on the container).
     Opacity + visibility only: never display: none, never pointer-events: none. */
  .hud-manifesto {
    transition: opacity 0.3s ease, visibility 0s linear 0s;
  }
  .exp-viewport.is-steps .hud-manifesto,
  .exp-viewport.is-end .hud-manifesto {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  }
  /* Edit mode: always visible and clickable (rule 14). */
  html.lds-selection-active .exp-viewport.is-steps .hud-manifesto,
  html.lds-selection-active .exp-viewport.is-end .hud-manifesto,
  html.lds-editing .exp-viewport.is-steps .hud-manifesto,
  html.lds-editing .exp-viewport.is-end .hud-manifesto,
  body.lds-editing .exp-viewport.is-steps .hud-manifesto,
  body.lds-editing .exp-viewport.is-end .hud-manifesto,
  body.lds-active .exp-viewport.is-steps .hud-manifesto,
  body.lds-active .exp-viewport.is-end .hud-manifesto {
    opacity: 1;
    visibility: visible;
  }
}

/* Visually hidden, still in the accessibility tree (SEO round 1 / S5). */
.lsg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
