/* ══════════════════════════════════════════════════════════
   One4All - Studio · estilos globais
   Tema greyscale alinhado com a app (light/dark)
   ══════════════════════════════════════════════════════════ */

:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --text: #000000;
  --text-secondary: #757575;
  --hairline: #e7e7e7;
  --grid: rgba(0, 0, 0, 0.055);
  --spot: rgba(0, 0, 0, 0.045);
  --shape: rgba(0, 0, 0, 0.03);
  --pill-fg: #9a6700;
  --pill-bg: #fbf0da;
  --pill-border: #f0e2bd;
}

[data-theme="dark"] {
  --bg: #121212;
  --surface: #1e1e1e;
  --text: #ffffff;
  --text-secondary: #9e9e9e;
  --hairline: #2c2c2c;
  --grid: rgba(255, 255, 255, 0.05);
  --spot: rgba(255, 255, 255, 0.05);
  --shape: rgba(255, 255, 255, 0.028);
  --pill-fg: #ffcb6b;
  --pill-bg: #33290f;
  --pill-border: #4a3c18;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #121212;
    --surface: #1e1e1e;
    --text: #ffffff;
    --text-secondary: #9e9e9e;
    --hairline: #2c2c2c;
    --grid: rgba(255, 255, 255, 0.05);
    --spot: rgba(255, 255, 255, 0.05);
    --shape: rgba(255, 255, 255, 0.028);
    --pill-fg: #ffcb6b;
    --pill-bg: #33290f;
    --pill-border: #4a3c18;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: background-color .3s ease, color .3s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Fundo: grelha + spotlight que segue o rato ── */
.fundo {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 75%);
}

.spot {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 38%), var(--spot), transparent 70%);
  transition: background .12s linear;
}

/* Formas suaves a flutuar */
.forma {
  position: fixed;
  border-radius: 50%;
  background: var(--shape);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: flutuar 16s ease-in-out infinite;
}
.forma-a { width: 420px; height: 420px; top: -140px; right: -100px; }
.forma-b { width: 340px; height: 340px; bottom: -120px; left: -80px; animation-delay: -8s; animation-duration: 20s; }

@keyframes flutuar {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 26px) scale(1.08); }
}

header, main, footer { position: relative; z-index: 1; }

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(2px);
}

.marca {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.marca span { color: var(--text-secondary); font-weight: 600; }

.tema-btn {
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.tema-btn:hover { border-color: var(--text-secondary); color: var(--text); transform: rotate(12deg); }
.tema-btn:active { transform: rotate(12deg) scale(.92); }

.tema-btn svg { width: 17px; height: 17px; }

[data-theme="dark"] .icone-lua { display: none; }
:root:not([data-theme="dark"]) .icone-sol { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icone-lua { display: none; }
  :root:not([data-theme]) .icone-sol { display: flex; }
}

/* ── Conteúdo principal ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

/* Animação de entrada em cascata */
.entrada {
  opacity: 0;
  transform: translateY(18px);
  animation: subir .7s cubic-bezier(.22, .8, .3, 1) forwards;
}
.d1 { animation-delay: .1s; }
.d2 { animation-delay: .25s; }
.d3 { animation-delay: .45s; }

@keyframes subir {
  to { opacity: 1; transform: translateY(0); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pill-fg);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 30px;
}

.pill-ponto {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pill-fg);
}

.pill-ponto::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--pill-fg);
  animation: pulsar 2.2s ease-out infinite;
}

@keyframes pulsar {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}

h1 {
  font-size: clamp(32px, 6.5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.12;
  max-width: 16ch;
  margin-bottom: 44px;
}

/* Palavra em destaque com brilho a varrer */
.destaque {
  background: linear-gradient(100deg,
    var(--text) 0%,
    var(--text) 42%,
    var(--text-secondary) 50%,
    var(--text) 58%,
    var(--text) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: varrer 4.5s ease-in-out infinite;
}

@keyframes varrer {
  0%, 20% { background-position: 110% 0; }
  60%, 100% { background-position: -60% 0; }
}

/* ── Linha de progresso com brilho ── */
.progresso {
  width: min(300px, 70vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.progresso-barra {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
  position: relative;
}

.progresso-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--text-secondary), var(--text), var(--text-secondary), transparent);
  background-size: 60% 100%;
  background-repeat: no-repeat;
  animation: deslizar 2.6s ease-in-out infinite;
}

@keyframes deslizar {
  0% { background-position: -80% 0; }
  100% { background-position: 220% 0; }
}

.progresso-legenda {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* ── Footer ── */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 18px 28px;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  color: var(--text-secondary);
}

footer a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  position: relative;
}

footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

footer a:hover::after { transform: scaleX(1); }

/* ── Responsivo / acessibilidade ── */
@media (max-width: 560px) {
  header, footer { padding-left: 20px; padding-right: 20px; }
  footer { flex-direction: column; justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .entrada { animation: none; opacity: 1; transform: none; }
  .forma, .pill-ponto::after, .destaque, .progresso-fill { animation: none; }
  .destaque { -webkit-text-fill-color: currentColor; background: none; }
  .progresso-fill { background: var(--text-secondary); background-size: 40% 100%; }
}
