/* NEXT4U CORP: estilo único do site. Tema claro por omissão; escuro conforme o aparelho. */

@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #EEF1F4;
  --ink: #15171A;
  --soft: #4B5563;
  --accent: #B8420A;
  --on-accent: #FFFFFF;
  --panel: #FFFFFF;
  --on-panel: #15171A;
  --footer: #E2E6EB;
  --focus: #B8420A;
  --pill: #FFFFFF;
  --pill-ink: #15171A;
  --wrap: 70rem;
  --gutter: 2rem;
  --section: 8.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #15171A;
    --ink: #EEF1F4;
    --soft: #A9B0BC;
    --accent: #FF8A4C;
    --on-accent: #15171A;
    --panel: #23262B;
    --on-panel: #EEF1F4;
    --footer: #1C1F23;
    --focus: #FF8A4C;
    --pill: #15171A;
    --pill-ink: #EEF1F4;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
}

main { flex: 1; }

h1, h2, p { margin: 0; }

a { color: var(--accent); text-underline-offset: 0.2em; transition: color 150ms ease-out, background-color 150ms ease-out; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  background: var(--ink); color: var(--ground); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Cabeçalho */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; padding-top: 1.75rem; padding-bottom: 1.75rem;
}
.wordmark { font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.wordmark .corp { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.75rem; font-size: 0.9375rem; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.5rem 0; }
.nav a:hover { color: var(--accent); }
.nav .pill { background: var(--ink); color: var(--ground); padding: 0.625rem 1.125rem; border-radius: 999px; }
.nav .pill:hover { background: var(--accent); color: var(--on-accent); }

/* Botões */
.button {
  display: inline-block; padding: 1rem 1.875rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 1.0625rem; line-height: 1.2; text-decoration: none;
}
.button:hover { background: var(--ink); color: var(--ground); }
.button-light { background: var(--on-panel); color: var(--panel); padding: 0.875rem 1.5rem; font-size: 1rem; }
.button-light:hover { background: var(--accent); color: var(--on-accent); }
.button-outline { background: transparent; color: var(--on-panel); border: 2px solid var(--on-panel); padding: 0.75rem 1.375rem; font-size: 1rem; }
.button-outline:hover { background: var(--on-panel); color: var(--panel); }

/* Vídeos de fundo. Topo: filmagem de telas de bolsa (Coverr, licença livre), bem clara no tema claro.
   Radar: fundo preto + mistura "screen" deixa aparecer a cor do painel. */
.bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none; z-index: 0;
}
/* Claro: imagem invertida (telas escuras viram claras) e misturada com "multiply", fica só um traço leve. */
.bg-hero { filter: grayscale(1) invert(1) brightness(1.2); mix-blend-mode: multiply; opacity: 0.28; object-position: 70% 50%; }
/* Radar no painel branco: invertido (preto vira branco) e "multiply"; no escuro, "screen". */
.bg-radar { filter: invert(1) hue-rotate(180deg); mix-blend-mode: multiply; opacity: 0.6; object-position: 78% 50%; }
@media (prefers-color-scheme: dark) {
  .bg-radar { filter: none; mix-blend-mode: screen; opacity: 0.9; }
  .bg-hero { filter: saturate(0.8); mix-blend-mode: normal; opacity: 0.45; }
}

/* Topo */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ground);
  padding-top: 7.5rem; padding-bottom: var(--section); margin-bottom: var(--section);
}
/* Véu do lado do texto, para o vídeo não competir com a leitura. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--ground) 0%, color-mix(in srgb, var(--ground) 70%, transparent) 45%, transparent 80%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.5rem; }
.motion-toggle {
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--ink);
  background: transparent; border: 0; padding: 0.75rem 0.25rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em;
}
.motion-toggle:hover { color: var(--accent); }
.hero h1 {
  max-width: 62.5rem;
  font-size: clamp(3rem, 8.75vw, 7rem); line-height: 0.98; font-weight: 700; letter-spacing: -0.04em;
  text-wrap: balance;
}
.lead { margin-top: 2.5rem; max-width: 37.5rem; font-size: 1.375rem; line-height: 1.55; color: var(--soft); }

/* Seções */
.section { padding-bottom: var(--section); }
.section h2 { font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }

.about { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem 4rem; }
.about .big { font-size: 1.375rem; line-height: 1.6; }
.about .more { margin-top: 1.25rem; color: var(--soft); line-height: 1.65; }

.panel {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--panel); color: var(--on-panel); border-radius: 1.75rem; padding: 4rem;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2.5rem;
}
.panel > div { position: relative; z-index: 1; }
.panel > div:first-of-type { flex: 1 1 28rem; min-width: 0; }
.apps-title { margin-bottom: 2rem; }
.panel h3 { margin: 0; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; font-weight: 700; letter-spacing: -0.04em; }

/* Outros apps: três cartões na mesma superfície do painel. */
.apps {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); gap: 1.5rem;
}
.app {
  background: var(--panel); color: var(--on-panel); border-radius: 1.5rem; padding: 2.25rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.app h3 { margin: 0; font-size: 1.75rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.app p { margin: 0; font-size: 1.0625rem; line-height: 1.6; }
.app a { margin-top: auto; padding-top: 0.75rem; font-weight: 700; }
.panel p { margin-top: 1.5rem; max-width: 35rem; font-size: 1.25rem; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Contact: faixa na cor de destaque, de ponta a ponta, colada ao rodapé. */
.contact-band { background: var(--accent); color: var(--on-accent); }
.contact-band .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2.5rem;
  padding-top: 5.5rem; padding-bottom: 5.5rem;
}
.contact-band .wrap > div:first-child { flex: 1 1 26rem; min-width: 0; }
.contact-band h2 { font-size: clamp(2.75rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.04em; }
.contact-band p { margin-top: 1.25rem; font-size: 1.25rem; line-height: 1.55; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.875rem; min-width: 0; }
.contact-actions span { padding-left: 0.5rem; font-size: 1rem; }
.email-pill {
  display: inline-block; max-width: 100%; overflow-wrap: anywhere;
  background: var(--pill); color: var(--pill-ink); text-decoration: none;
  font-weight: 700; font-size: clamp(1.0625rem, 2.2vw, 1.375rem); line-height: 1.2;
  padding: 1.25rem 2rem; border-radius: 999px;
  transition: transform 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
}
.email-pill:hover { color: var(--pill-ink); transform: translateY(-2px); }
.contact-band :focus-visible { outline-color: var(--on-accent); }

/* Páginas de texto (privacy, 404) */
.doc { padding-top: 5rem; padding-bottom: var(--section); }
.doc h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.doc .updated { margin-top: 1rem; color: var(--soft); font-size: 1rem; }
.doc h2 { margin-top: 3rem; font-size: 1.5rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.doc p, .doc ul { max-width: 42rem; margin-top: 1rem; }
.doc ul { padding-left: 1.25rem; }
.doc li + li { margin-top: 0.5rem; }
.doc .button { margin-top: 2.5rem; }

/* Rodapé */
.site-footer { background: var(--footer); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding-top: 1.75rem; padding-bottom: 1.75rem; font-size: 0.875rem; color: var(--soft);
}
.site-footer a { color: var(--ink); display: inline-block; padding: 0.25rem 0; }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; gap: 1.5rem; }

@media (max-width: 760px) {
  :root { --gutter: 1.25rem; --section: 5.5rem; }
  .hero { padding-top: 3.5rem; }
  .lead { margin-top: 1.75rem; font-size: 1.1875rem; }
  .about { grid-template-columns: 1fr; gap: 1.25rem; }
  .about .big { font-size: 1.1875rem; }
  .panel { padding: 2.25rem 1.5rem; border-radius: 1.25rem; }
  .panel p { font-size: 1.0625rem; }
  .nav { gap: 0.5rem 1.25rem; }
}

/* Movimento: entrada do topo ao carregar e revelação das seções ao rolar (só CSS).
   Sem suporte a animation-timeline, o conteúdo aparece parado, sem esconder nada. */
@keyframes rise {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: none; }
}
@keyframes grow {
  from { opacity: 0.4; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

.in { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0ms); }
.in.d1 { --d: 150ms; }
.in.d2 { --d: 300ms; }

.button, .nav .pill { transition: color 150ms ease-out, background-color 150ms ease-out, transform 150ms ease-out; }
.button:hover, .nav .pill:hover { transform: translateY(-2px); }
.button:active, .nav .pill:active { transform: translateY(0) scale(0.98); }

@supports (animation-timeline: view()) {
  .reveal > * {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }
  .reveal > *:nth-child(2) { animation-range: entry 15% cover 35%; }
  /* A faixa de Contact fica no fim da página: termina a entrada assim que aparece inteira. */
  .contact-band .reveal > * { animation-range: entry 0% entry 80%; }
  .panel.reveal-grow {
    animation: grow linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg { display: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
