/* ===================================================================
   COSMOS — FUNDAÇÃO COMPARTILHADA

   As quatro experiências internas do Cosmos (Mapa astral, Astros de
   hoje, Quiromancia e Tarô) precisam pertencer ao mesmo universo sem
   virar quatro cópias com o título trocado.

   A divisão de trabalho é esta:

     ESTE ARQUIVO   o que TEM de ser igual — paleta, fundo, ritmo
                    tipográfico, barra de topo, campos, botões, a
                    gramática de profundidade e o contrato do menu.

     CADA PÁGINA    o que TEM de ser diferente — a assinatura visual,
                    a geometria própria, o modelo de interação e a
                    superfície dominante.

   Quem chega numa das quatro deve reconhecer a Aura na hora, e ainda
   assim sentir que entrou num lugar específico.

   Herda a família tipográfica do Cosmos: serifada de tela para display
   (a mesma Georgia que a página-mãe usa) e Inter para o texto. As duas
   fontes da marca são declaradas aqui porque estas páginas não carregam
   aura-theme.css — elas têm identidade própria dentro do aplicativo.
   =================================================================== */

@font-face {
  font-family: "Inter";
  src: local("Inter"), url("/midia/fontes/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fira Code";
  src: local("Fira Code"), url("/midia/fontes/fira-code-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta — a mesma declarada em cosmos.html, palavra por palavra. */
  --lavender: #ECE5F0;
  --lavender-light: #F7F4F9;
  --lavender-deep: #DCD1E4;
  --orange: #E98A15;
  --blue: #465D8D;
  --green: #173B35;
  --green-2: #214B43;
  --paper: #FFF9EF;
  --ink: #18352F;
  --muted: #667085;
  --line: rgba(70, 93, 141, .15);
  --line-forte: rgba(70, 93, 141, .30);

  /* Âmbar legível como TEXTO sobre superfície clara. O #E98A15 puro é
     cor de superfície: sobre lavanda ele fica em 2.1:1. */
  --orange-lido: #9C5400;

  /* Profundidade: o cartão está descolado do fundo, não flutuando.
     Duas camadas — uma difusa e larga, uma curta e próxima. */
  --shadow: 0 18px 44px rgba(56, 59, 90, .13), 0 2px 6px rgba(56, 59, 90, .06);
  --shadow-hover: 0 24px 60px rgba(56, 59, 90, .18), 0 3px 9px rgba(56, 59, 90, .08);
  --shadow-fundo: 0 26px 70px rgba(12, 32, 28, .30);

  /* Cantos: quase retos. 7px é o valor que o Cosmos já usa nos
     cartões; 2px para o que é pequeno. A pílula é exceção, e só onde a
     forma redonda tem função (etiqueta de estado, chip de seleção). */
  --raio: 7px;
  --raio-mini: 2px;

  --menu-reserva: calc(104px + env(safe-area-inset-bottom, 0px));

  /* CONTRATO DO MENU INFERIOR
     O componente vive em Shadow DOM e só herda propriedades
     personalizadas. Estas cinco são o contrato; nenhuma linha de
     menu-universal.js é tocada. */
  --aura-menu-fundo: var(--lavender);
  --aura-menu-tinta: rgba(24, 53, 47, .62);
  --aura-menu-ativo: var(--orange);
  --aura-menu-linha: rgba(70, 93, 141, .15);
  --aura-black: var(--ink);

  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--lavender);
}

/* O fundo mantém a profundidade da página-mãe: uma luz no canto
   superior esquerdo e a descida de #F7F4F9 para #ECE5F0. `fixed`
   ancora a mancha na tela, então ela não se repete na rolagem. */
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -4%, rgba(255, 255, 255, .98) 0, rgba(247, 244, 249, .92) 15rem, transparent 31rem),
    linear-gradient(180deg, var(--lavender-light) 0%, var(--lavender) 100%);
  background-attachment: fixed;
  font-family: var(--sans);
  font-weight: 430;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Barra de rolagem fora da estética, rolagem preservada.
   Cross-browser: Firefox, IE/Edge legado e WebKit. */
html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* -------------------------------------------------------------------
   ESTRUTURA
   ------------------------------------------------------------------- */
.shell {
  width: min(100% - 22px, 620px);
  margin: 0 auto;
  padding: 20px 0 var(--menu-reserva);
}

/* A barra de topo repete a do Cosmos e acrescenta uma coisa só: o
   caminho de volta. Quem entrou numa experiência precisa saber sair
   dela sem depender do gesto do sistema. */
html.aura-aguardando main.shell > :not([data-aura-casca]),
html.aura-aguardando [data-aura-privado] {
  visibility: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 34px;
}

.voltar {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.voltar::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  transition: width .22s ease;
}

.voltar:hover::before { width: 32px; }

.marca {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
  padding-top: 11px;
}

.marca strong {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.marca span {
  color: var(--orange-lido);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
}

/* -------------------------------------------------------------------
   TIPOGRAFIA — a escala é a mesma; o que muda por página é o peso que
   cada nível recebe na composição.
   ------------------------------------------------------------------- */

/* Eyebrow: o traço antes da palavra é a assinatura do Cosmos. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--orange-lido);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 1px;
  background: var(--orange);
}

.display {
  margin: 0;
  color: var(--green);
  font-family: var(--serif);
  font-weight: 500;
  line-height: .93;
  letter-spacing: -.05em;
}

.display--hero { font-size: clamp(44px, 13.5vw, 68px); }
.display--secao { font-size: clamp(29px, 8.4vw, 40px); letter-spacing: -.042em; }
.display--card  { font-size: clamp(21px, 6vw, 26px); line-height: .98; letter-spacing: -.035em; }

.texto {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.texto--filete {
  padding-left: 14px;
  border-left: 1px solid rgba(233, 138, 21, .58);
}

.meta {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------
   SUPERFÍCIES
   ------------------------------------------------------------------- */
.painel {
  border: 1px solid var(--line);
  border-radius: var(--raio);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.painel--claro { background: var(--lavender-light); }

/* Palco escuro: usado quando a experiência precisa de um fundo que
   sustente imagem ou desenho. É o contraponto da página clara. */
.palco {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: var(--raio);
  background:
    radial-gradient(circle at 50% 12%, var(--green-2), var(--green) 68%);
  color: var(--lavender);
  box-shadow: var(--shadow-fundo);
}

/* -------------------------------------------------------------------
   CONTROLES
   ------------------------------------------------------------------- */
.campo { display: grid; gap: 7px; }

.campo__rotulo {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 13px;
  border: 1px solid var(--line);
  border-radius: var(--raio-mini);
  background: #fff;
  color: var(--ink);
  /* 16px é o piso: abaixo disso o iOS dá zoom ao focar. */
  font-size: 16px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.campo textarea { min-height: 96px; resize: vertical; line-height: 1.5; }

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(70, 93, 141, .13);
}

.campo input::placeholder,
.campo textarea::placeholder { color: rgba(102, 112, 133, .72); }

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--raio-mini);
  background: var(--green);
  color: var(--lavender);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background-color .2s ease, transform .16s ease, opacity .2s ease;
}

.botao::after {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: .75;
  transition: width .22s ease;
}

.botao:hover { background: var(--green-2); }
.botao:hover::after { width: 30px; }
.botao:active { transform: scale(.99); }

.botao[disabled] {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}

.botao--acento { background: var(--orange); color: #2A1803; }
.botao--acento:hover { background: #D67D0C; }

.botao--vazado {
  background: transparent;
  border: 1px solid var(--line-forte);
  color: var(--blue);
  font-size: 12px;
}

.botao--vazado:hover { background: rgba(70, 93, 141, .07); }

/* -------------------------------------------------------------------
   ESTADOS SIMULADOS

   As quatro páginas têm etapas. Só uma fica visível por vez, e a troca
   é feita por atributo no <body> — nunca escondendo com display:none
   solto, para o leitor de tela acompanhar a mudança.
   ------------------------------------------------------------------- */
.etapa { display: none; }
.etapa.is-ativa { display: block; animation: entrar .5s cubic-bezier(.22, .61, .36, 1) both; }

@keyframes entrar {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

/* O compasso de espera: três pontos que respiram, e o texto de status
   trocando ao lado. Sem spinner — a Aura não tem roda girando. */
.espera {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.espera__pontos { display: inline-flex; gap: 5px; }

.espera__pontos i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
  animation: respirar 1.25s ease-in-out infinite;
}

.espera__pontos i:nth-child(2) { animation-delay: .16s; }
.espera__pontos i:nth-child(3) { animation-delay: .32s; }

@keyframes respirar {
  0%, 100% { opacity: .25; transform: translateY(0); }
  45%      { opacity: 1;   transform: translateY(-3px); }
}

/* Aviso honesto do protótipo. Aparece em todas as quatro: nenhuma
   delas processa nada de verdade ainda, e a interface não deve sugerir
   o contrário. */
.nota-proto {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  padding: 12px 14px;
  border-left: 2px solid var(--orange);
  background: rgba(233, 138, 21, .07);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.nota-proto strong {
  color: var(--orange-lido);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.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;
}

/* -------------------------------------------------------------------
   TELAS MAIORES — o desktop REORGANIZA, não amplia.
   ------------------------------------------------------------------- */
@media (min-width: 900px) {
  .shell {
    width: min(1080px, calc(100% - 56px));
    padding-top: 30px;
  }

  .topbar { margin-bottom: 44px; }
  .texto { font-size: 13.5px; }
  .botao { width: auto; min-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
