/* ==========================================================
   N75 — Página de rosto (teaser)
   Mobile-first · sem dependências · respeita reduced-motion
   ========================================================== */

:root {
  --navy-900: #0b1622;
  --navy-800: #11202f;
  --navy-700: #213a51;   /* marinho do logo */
  --blue-500: #5289c0;   /* azul do logo */
  --blue-300: #8fb5dc;
  --ink-100: #e8eff7;
  --ink-300: #a9bccf;
  --ink-500: #6f869c;

  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 50% 0%, #17304a 0%, transparent 60%),
    radial-gradient(90% 70% at 50% 110%, #0f2740 0%, transparent 60%),
    var(--navy-900);
  color: var(--ink-100);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Fundo: campo de partículas + lanterna ---------- */
.field {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: .55;
}

.spotlight {
  --x: 50%; --y: 40%;
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(260px circle at var(--x) var(--y), rgba(82,137,192,.16), transparent 70%);
  transition: background .2s linear;
}

/* grade sutil revelada apenas onde está a "lanterna" */
.spotlight::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(143,181,220,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,181,220,.10) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(220px circle at var(--x) var(--y), #000 0%, transparent 75%);
          mask-image: radial-gradient(220px circle at var(--x) var(--y), #000 0%, transparent 75%);
}

/* ---------- Palco ---------- */
.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: 4rem 1.25rem 2rem;
  text-align: center;
}

.status {
  margin: 0;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .85rem;
  border: 1px solid rgba(143,181,220,.22);
  border-radius: 999px;
  font: 500 .72rem/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-300);
  background: rgba(17,32,47,.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: fade-up .8s var(--ease-out) 2.6s forwards;
}

.status__dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.6);
  animation: pulse 2s infinite;
}

/* ---------- Logo ---------- */
.brand { margin: 0; line-height: 0; }

.logo {
  /* limita pela largura E pela altura (celular deitado) */
  width: min(78vw, 520px, 70svh);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 18px 40px rgba(82,137,192,.18));
}

.logo path {
  stroke-width: 6;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  fill-opacity: 0;
  animation:
    draw 1.6s var(--ease-out) forwards,
    fill-in .9s ease forwards;
}

.logo-n  { stroke: #fff;            fill: #fff;            animation-delay: .2s, 1.3s; }
.logo-75 { stroke: var(--blue-500); fill: var(--blue-500); animation-delay: .6s, 1.6s; }

/* estado final após a abertura (classe aplicada via JS) */
.logo.is-ready path {
  animation: none;
  stroke-dashoffset: 0;
  fill-opacity: 1;
  stroke-opacity: 0;
}

/* "falha" ocasional no 75 — disparada via JS */
.logo.is-ready.is-glitch .logo-75 { animation: glitch .38s steps(2) 1; }

/* ---------- Texto ---------- */
.headline {
  margin: 0;
  max-width: 34ch;
  text-wrap: balance;
  font-weight: 500;
  font-size: clamp(1.25rem, 4.2vw, 2rem);
  line-height: 1.3;
  letter-spacing: -.01em;
  opacity: 0;
  animation: fade-up .9s var(--ease-out) 2.2s forwards;
}

.headline__soft { color: var(--ink-300); font-weight: 400; }

.terminal {
  margin: 0;
  min-height: 1.6em;
  font: 400 clamp(.85rem, 2.6vw, 1rem)/1.6 var(--font-mono);
  color: var(--blue-300);
  opacity: 0;
  animation: fade-up .8s var(--ease-out) 2.5s forwards;
}

.terminal__prompt { color: var(--blue-500); margin-right: .4rem; }

.terminal__cursor {
  display: inline-block;
  width: .6em; height: 1.1em;
  margin-left: .15rem;
  vertical-align: -.18em;
  background: var(--blue-500);
  animation: blink 1s steps(1) infinite;
}

.hint {
  margin: 1rem 0 0;
  font: 400 .78rem/1.5 var(--font-mono);
  color: var(--ink-500);
  opacity: 0;
  animation: fade-in 1.2s ease 4.5s forwards;
}

.hint__key { color: var(--ink-300); }

/* ---------- Rodapé ---------- */
.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
  padding: 1.25rem;
  font: 400 .72rem/1 var(--font-mono);
  letter-spacing: .08em;
  color: var(--ink-500);
}

/* ---------- Easter egg ---------- */
.secret {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center;
  padding: 1.25rem;
  background: rgba(6,12,19,.78);
  backdrop-filter: blur(8px);
  animation: fade-in .3s ease;
}
.secret[hidden] { display: none; }

.secret__box {
  max-width: 420px;
  padding: 2rem 1.75rem;
  border: 1px solid rgba(82,137,192,.4);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03) inset;
  text-align: left;
  animation: fade-up .5s var(--ease-out);
}

.secret__tag {
  margin: 0 0 .75rem;
  font: 500 .7rem/1 var(--font-mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-500);
}
.secret__title { margin: 0 0 .6rem; font-size: 1.6rem; letter-spacing: -.02em; }
.secret__text  { margin: 0 0 1.5rem; color: var(--ink-300); line-height: 1.55; }

.secret__close {
  font: 500 .8rem/1 var(--font-mono);
  padding: .7rem 1.1rem;
  border: 1px solid var(--blue-500);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-100);
  cursor: pointer;
  transition: background .2s;
}
.secret__close:hover,
.secret__close:focus-visible { background: rgba(82,137,192,.2); outline: none; }

/* ---------- Animações ---------- */
@keyframes draw    { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink   { 50% { opacity: 0; } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
@keyframes glitch {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-6px, 2px); filter: hue-rotate(40deg); }
  50%  { transform: translate(5px,-2px); }
  75%  { transform: translate(-2px,1px); }
  100% { transform: translate(0,0); }
}

/* ---------- Tablet / Desktop ---------- */
@media (min-width: 768px) {
  .stage { gap: 2rem; }
  .hint  { font-size: .82rem; }
}

/* ---------- Telas grandes / ultra-wide ---------- */
@media (min-width: 1600px) and (min-height: 800px) {
  .logo     { width: min(640px, 60svh); }
  .headline { font-size: 2.4rem; }
  .terminal { font-size: 1.15rem; }
  .status, .foot { font-size: .8rem; }
  .hint     { font-size: .9rem; }
}

/* ---------- Telas baixas (celular deitado) ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .stage    { gap: .75rem; padding: 1.25rem 1.25rem .5rem; }
  .headline { font-size: clamp(1rem, 3.4vh, 1.25rem); }
  .hint     { margin-top: 0; }
  .foot     { padding: .75rem; }
}

/* ---------- Acessibilidade: menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .logo path { stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; }
  .status, .headline, .terminal, .hint { opacity: 1; }
  .terminal__cursor { animation: none; }
  .field { display: none; }
}
