/* ============================================================
   Shift Systems · v2 "mar aberto"
   navy profundo + dourado-âmbar · logo permanece roxa
   sem WebGL, sem noise, sem boot screen — velocidade é a energia
   ============================================================ */

:root {
  color-scheme: dark;
  --navy: #0A1428;
  --navy-2: #0E1D3A;
  --paper: #F6F5F1;
  --muted: rgba(246, 245, 241, 0.68);
  --accent: #F2A63D;
  --accent-deep: #D4841A;
  --accent-glow: rgba(242, 166, 61, 0.5);
  --gold: #FFC93D;
  --gold-glow: rgba(255, 201, 61, 0.35);
  --purple: #B56BFF;             /* reservado para a marca */
  --purple-glow: rgba(181, 107, 255, 0.55);
  --border: rgba(255, 255, 255, 0.1);
  --glass: linear-gradient(180deg, rgba(18, 32, 60, 0.72), rgba(10, 20, 40, 0.55));
  --glass-strong: linear-gradient(180deg, rgba(20, 36, 66, 0.9), rgba(10, 20, 40, 0.78));
  --focus: rgba(255, 201, 61, 0.85);
}

*, *::before, *::after { box-sizing: border-box; }
img, svg, video, canvas { max-width: 100%; }

html { scroll-padding-top: 96px; scroll-behavior: smooth; }
html, body {
  background: var(--navy);
  color: var(--paper);
  font-family: 'Geist', system-ui, sans-serif;
}
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-size: 16px;
}

/* fundo estático em camadas — oceano no topo, pôr-do-sol no horizonte.
   nenhuma animação, nenhum canvas: pinta instantâneo em qualquer aparelho. */
.page-bg {
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(43, 108, 209, 0.16), transparent 60%),
    radial-gradient(800px 620px at -10% 28%, rgba(23, 64, 128, 0.2), transparent 60%),
    radial-gradient(1000px 620px at 50% 115%, rgba(242, 166, 61, 0.12), transparent 62%),
    radial-gradient(700px 420px at 78% 112%, rgba(255, 201, 61, 0.07), transparent 60%),
    var(--navy);
}

.grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ===== superfícies ===== */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: 0 18px 70px rgba(2, 8, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.glass:hover {
  border-color: rgba(242, 166, 61, 0.4);
  background: linear-gradient(180deg, rgba(242, 166, 61, 0.07), rgba(10, 20, 40, 0.6));
  box-shadow: 0 22px 80px rgba(2, 8, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.glass-strong {
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 90px rgba(2, 8, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===== botões ===== */
.btn-primary {
  background: linear-gradient(135deg, #FFC873 0%, var(--accent) 52%, var(--accent-deep) 100%);
  color: #1A0A03;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 52px -10px rgba(242, 166, 61, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-ghost {
  background: rgba(10, 20, 40, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--paper);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(242, 166, 61, 0.09); border-color: rgba(242, 166, 61, 0.35); }
.btn-ghost:active { transform: translateY(1px) scale(0.99); }

/* ===== tipografia ===== */
.display {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
.eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 22px var(--gold-glow);
}
.num-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 201, 61, 0.9);
}

::selection { background: var(--gold); color: #14100a; }

.hr-grad {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 166, 61, 0.28), rgba(255, 201, 61, 0.22), transparent);
}

/* ===== a marca (roxa, sempre) ===== */
.mark-glow { filter: drop-shadow(0 0 10px var(--purple-glow)); }
@keyframes shift-loop {
  0%, 70%, 100% { transform: translate(0, 0); }
  80%           { transform: translate(2px, -1px); }
  90%           { transform: translate(-2px, 1px); }
}
.mark-shift .slab-top    { animation: shift-loop 5s ease-in-out infinite; transform-origin: center; }
.mark-shift .slab-bottom { animation: shift-loop 5s ease-in-out infinite reverse; transform-origin: center; }

/* easter egg · 5 cliques na marca e o chapéu aparece (quem sabe, sabe) */
.straw-hat {
  position: absolute;
  top: -12px; left: 50%;
  width: 26px; height: auto;
  opacity: 0;
  transform: translateX(-50%) translateY(6px) rotate(-14deg);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1.4);
  pointer-events: none;
}
html.op-mode .straw-hat { opacity: 1; transform: translateX(-50%) translateY(0) rotate(-14deg); }
html.op-mode .eyebrow { color: #FFD54A; text-shadow: 0 0 26px rgba(255, 213, 74, 0.5); }
html.op-mode .btn-primary {
  background: linear-gradient(135deg, #FFE082 0%, #FFD54A 52%, #E8B33C 100%);
  box-shadow: 0 12px 40px -10px rgba(255, 213, 74, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ===== entrada do site — uma vez por load, só transform/opacity ===== */
@keyframes header-drop {
  from { transform: translateY(-18px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
body > header { animation: header-drop 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* varredura de luz — o sol passando pelo convés ao abrir a página */
@keyframes dawn { to { transform: translateX(120%); } }
.dawn-sweep {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 201, 61, 0.05) 48%, rgba(242, 166, 61, 0.09) 52%, transparent 58%);
  transform: translateX(-120%);
  animation: dawn 1.2s ease-out 0.15s forwards;
}

/* coreografia de entrada: delays incrementais pros reveals do hero */
html.js .reveal.d1 { transition-delay: 0.05s; }
html.js .reveal.d2 { transition-delay: 0.12s; }
html.js .reveal.d3 { transition-delay: 0.2s; }
html.js .reveal.d4 { transition-delay: 0.28s; }
html.js .reveal.d5 { transition-delay: 0.36s; }
html.js .reveal.d6 { transition-delay: 0.44s; }

/* ===== barra de progresso de leitura ===== */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%; z-index: 90;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--gold));
  box-shadow: 0 0 10px rgba(242, 166, 61, 0.55);
}

/* ===== header ===== */
#site-header {
  max-width: 80rem;
  border: 1px solid transparent;
  transition: max-width 0.3s ease, background 0.3s, border-color 0.3s, box-shadow 0.3s, padding 0.3s;
}
#site-header.scrolled { max-width: 64rem; }
#site-header.scrolled {
  background: rgba(12, 22, 44, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 40px -12px rgba(2, 8, 20, 0.7);
}
.nav-link {
  color: rgba(246, 245, 241, 0.66);
  transition: color 0.2s, background 0.2s;
  border-radius: 9999px;
}
.nav-link:hover { color: var(--paper); background: rgba(255, 255, 255, 0.05); }
.nav-link.active { color: var(--paper); }
.nav-link.active::after {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 9999px;
  background: var(--accent);
  margin-left: 7px;
  vertical-align: middle;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* menu mobile */
#mobile-menu {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(8, 15, 30, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
#mobile-menu.open { opacity: 1; pointer-events: auto; }
#mobile-menu a { font-size: 28px; padding: 12px 24px; min-height: 44px; }

/* ===== reveal — curto e direto (site lento não combina com o discurso) =====
   fail-open: o estado escondido só existe com JS ativo (html.js);
   sem JS, todo o conteúdo fica visível. */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
html.js .reveal.in { opacity: 1; transform: none; }
html.js .stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
html.js .stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: 0.04s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.22s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.28s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.34s; }

/* ===== hero "shift engine" — painel tech leve, css + poucos intervals ===== */
@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.floaty-slow { animation: float-slow 7s ease-in-out infinite; }

.hero-seg {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s;
}
.hero-seg.lit {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
}

.hero-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: rgba(255, 255, 255, 0.12);
  transition: height 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-bar.hi { background: linear-gradient(180deg, var(--gold), var(--accent)); }

@keyframes log-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.hero-log-line { animation: log-in 0.4s ease both; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== spotlight que segue o cursor (mantido da v1 — é bom) ===== */
.spot { position: relative; }
.spot::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 201, 61, 0.07), transparent 48%),
    radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 166, 61, 0.14), transparent 56%);
  opacity: 0; transition: opacity 0.3s;
}
.spot:hover::before { opacity: 1; }

/* ===== a rota (o caminho do lead) ===== */
.route-line {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(242, 166, 61, 0.45), rgba(255, 201, 61, 0.45), transparent);
  overflow: visible;
}
/* a linha se desenha quando entra na tela (fail-open sem JS) */
html.js [data-draw] { transform: scaleX(0); transform-origin: left center; transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.3, 1); }
html.js [data-draw].in { transform: scaleX(1); }

@keyframes sail-x {
  0%   { left: 0%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
/* barquinho dourado velejando a rota (quem sabe, sabe) */
.sail-ship {
  position: absolute; top: 50%;
  width: 20px; height: 15px;
  margin-top: -13px; margin-left: -10px;
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(255, 201, 61, 0.55));
  animation: sail-x 9s linear infinite;
}
html.js [data-draw]:not(.in) .sail-ship { visibility: hidden; animation-play-state: paused; }
.waypoint {
  width: 12px; height: 12px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 201, 61, 0.6);
  background: var(--navy);
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.waypoint.lit {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* linha vertical do processo + ponto viajante (mantidos — baratos e bonitos) */
@keyframes travel-y {
  0%   { top: 0%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.travel-dot {
  position: absolute; left: 50%;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 9999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: travel-y 5s linear infinite;
}

/* ===== quiz (log pose) ===== */
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: step-in 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.quiz-option {
  cursor: pointer;
  text-align: left;
  width: 100%;
  min-height: 44px;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.quiz-option:hover { border-color: rgba(242, 166, 61, 0.45); background: rgba(242, 166, 61, 0.07); }
.quiz-option:active { transform: scale(0.99); }
.quiz-option.picked { border-color: var(--accent); background: rgba(242, 166, 61, 0.12); }

@keyframes compass-spin {
  0%   { transform: rotate(0deg); }
  60%  { transform: rotate(380deg); }
  80%  { transform: rotate(350deg); }
  100% { transform: rotate(360deg); }
}
.compass-needle { transform-origin: 12px 12px; }
.compass-spin .compass-needle { animation: compass-spin 1.1s cubic-bezier(0.3, 0, 0.2, 1) both; }

/* contador de destaque no resultado */
.treasure-num {
  color: var(--gold);
  text-shadow: 0 0 34px var(--gold-glow);
}

/* ===== foco visível (teclado) ===== */
:where(a, button, [role="button"], input, textarea, select):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 8px;
}
:where(a, button, [role="button"]) { -webkit-tap-highlight-color: rgba(255, 201, 61, 0.18); }

/* ===== mobile ===== */
@media (max-width: 767px) {
  .display { letter-spacing: -0.025em; }
  .glass {
    background: linear-gradient(180deg, rgba(16, 30, 56, 0.94), rgba(10, 20, 40, 0.82));
    border-color: rgba(255, 255, 255, 0.14);
  }
  .grid-overlay { opacity: 0.5; background-size: 52px 52px; }
}

/* ===== respeito a quem prefere menos movimento ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .sail-ship, .travel-dot, .mark-shift .slab-top, .mark-shift .slab-bottom, .floaty-slow { animation: none !important; visibility: visible !important; }
  .compass-spin .compass-needle { animation: none !important; }
  .dawn-sweep { display: none !important; }
  body > header { animation: none !important; }
  html.js [data-draw] { transform: none !important; }
  .reveal, .stagger > *, .quiz-step.active, .hero-log-line { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation-duration: 0.01ms !important; }
}
