/* Tela de abertura (`/`; correção B-043): protótipo "P1 — Foco" aprovado pelo mantenedor em 2026-12-01.
   Tema escuro e fonte própria só aqui (DIVERGENCIAS.md); o amarelo vem do tokens.css (--cor-marca). */
@font-face {
  font-family: "CCWIN Abertura";
  src: url("fontes/ccwin-abertura.woff2") format("woff2");
  font-weight: 480 760;
  font-stretch: 100% 122%;
  font-display: swap;
}

:root {
  --preto: #0a0a09;
  --off: #f3f0e7;
  --off-suave: #d9d5c9;
  --amarelo: var(--cor-marca);
  --amarelo-claro: #ffe169;
  --saida: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
:root { background: var(--preto); color-scheme: dark; }  /* :root, e depois do tokens.css: vence o `light` dele */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  font-family: "CCWIN Abertura", "Segoe UI", system-ui, sans-serif;
  color: var(--off);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--amarelo); color: var(--preto); }

/* ---------- foto e véu ---------- */
.fundo, .veu { position: fixed; inset: 0; }
.fundo { z-index: -2; overflow: hidden; }
.fundo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.veu {
  z-index: -1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 78% 46% at 50% 46%, rgba(10,10,9,.44) 0%, rgba(10,10,9,.3) 45%, rgba(10,10,9,0) 100%),
    linear-gradient(to bottom, rgba(10,10,9,.5) 0%, rgba(10,10,9,0) 22%, rgba(10,10,9,0) 68%, rgba(10,10,9,.5) 84%, rgba(10,10,9,.82) 100%);
}

/* ---------- composição ---------- */
.palco {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 6.4vh, 4rem);
  padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 4vw, 3rem) 0;
}

.assinatura {
  display: grid;
  grid-template-columns: auto 2px auto;
  align-items: center;
  column-gap: clamp(1.5rem, 2.6vw, 2.75rem);
}
.logo {
  display: block;
  height: clamp(5.4rem, 8.6vw, 9.8rem);
  width: auto;
}
.fio {
  align-self: stretch;
  background: linear-gradient(to bottom, rgba(253,209,48,0), rgba(253,209,48,.85) 22%, rgba(253,209,48,.85) 78%, rgba(253,209,48,0));
  transform-origin: 50% 50%;
}
.titulo {
  margin: 0;
  font-size: clamp(2.5rem, 4.5vw, 5.4rem);
  font-weight: 760;
  font-stretch: 122%;
  line-height: 1.03;
  letter-spacing: -.022em;
  text-shadow: 0 2px 28px rgba(0,0,0,.45);
}
.titulo span { display: block; white-space: nowrap; }
.sub {
  margin: clamp(.7rem, 1.2vw, 1.15rem) 0 0;
  font-size: clamp(1.1rem, 1.86vw, 2.25rem);
  font-weight: 480;
  line-height: 1.25;
  letter-spacing: -.004em;
  color: var(--off-suave);
  text-shadow: 0 1px 18px rgba(0,0,0,.5);
}

/* ---------- botões ---------- */
.entrar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  min-width: clamp(15rem, 19vw, 18.5rem);
  height: clamp(4rem, 5vw, 4.75rem);
  padding: 0 2.6rem;
  border-radius: 999px;
  background: var(--amarelo);
  color: var(--preto);
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: 700;
  font-stretch: 105%;
  letter-spacing: .005em;
  text-decoration: none;
  box-shadow: 0 14px 40px -12px rgba(0,0,0,.75), 0 2px 0 rgba(255,255,255,.28) inset;
  transition: background-color .18s var(--saida), box-shadow .25s var(--saida);
}
.entrar svg { transition: transform .3s var(--saida); }
.entrar:hover { background: var(--amarelo-claro); box-shadow: 0 18px 46px -12px rgba(0,0,0,.8), 0 2px 0 rgba(255,255,255,.4) inset; }
.entrar:hover svg { transform: translateX(5px); }
.entrar:active { background: #eec21f; }

.rodape {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 4vh, 2.5rem) 1.25rem clamp(1.5rem, 4.4vh, 2.75rem);
}
.site {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 3rem;
  padding: .6rem 1.5rem;
  border: 1px solid rgba(243,240,231,.5);
  border-radius: 999px;
  color: var(--off);
  font-size: 1rem;
  font-weight: 520;
  letter-spacing: .005em;
  text-decoration: none;
  transition: border-color .18s var(--saida), background-color .18s var(--saida);
}
.site svg { transition: transform .3s var(--saida); }
.site:hover { border-color: var(--off); background: rgba(243,240,231,.09); }
.site:hover svg { transform: translate(2px, -2px); }

a:focus-visible { outline: 2px solid var(--off); outline-offset: 4px; }

/* ---------- entrada: o fio acende e a assinatura sai de trás dele ---------- */
@keyframes assentar   { from { transform: scale(1.07); } }
@keyframes escurecer  { from { opacity: 0; } }
@keyframes fio        { from { transform: scaleY(0); opacity: 0; } }
@keyframes sai-esq    { from { transform: translateX(2.5rem); clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 -5%); } }
@keyframes sai-dir    { from { transform: translateX(-2.5rem); clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% -5% -10% 0); } }
@keyframes subir      { from { opacity: 0; transform: translateY(.9rem); } }
@keyframes surgir     { from { opacity: 0; } }

.fundo img  { animation: assentar 2.2s var(--saida) both; }
.veu        { animation: escurecer 1.4s ease-out both; }
.fio        { animation: fio .7s var(--saida) .25s both; }
.logo       { animation: sai-esq .85s var(--saida) .55s both; }
.texto      { animation: sai-dir .95s var(--saida) .6s both; }
.entrar     { animation: subir .7s var(--saida) 1.1s both; }
.site       { animation: surgir .8s ease-out 1.45s both; }

@media (prefers-reduced-motion: reduce) {
  .fundo img, .fio, .logo, .texto { animation: none; }
  .veu { animation: none; }
  .entrar, .site { animation: surgir .4s ease-out both; }
  .entrar svg, .site svg { transition: none; }
}

/* ---------- celular / retrato ---------- */
@media (max-width: 860px), (max-aspect-ratio: 4/5) {
  .veu {
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
      linear-gradient(to bottom, rgba(10,10,9,.35) 0%, rgba(10,10,9,0) 16%, rgba(10,10,9,.12) 34%, rgba(10,10,9,.62) 52%, rgba(10,10,9,.74) 78%, rgba(10,10,9,.9) 100%);
  }
  .palco { justify-content: flex-end; gap: 2.25rem; padding-bottom: .5rem; }
  .assinatura { grid-template-columns: 1fr; justify-items: center; row-gap: 1.35rem; text-align: center; }
  .logo { height: 3.9rem; }
  .fio { width: 2.75rem; height: 2px; align-self: auto; background: var(--amarelo); }
  .titulo { font-size: clamp(1.9rem, 8.6vw, 3rem); line-height: 1.05; }
  .fundo img { object-position: 50% 0; }
  .sub { font-size: clamp(1.06rem, 4.7vw, 1.4rem); margin-top: .8rem; text-wrap: balance; max-width: 19em; }
  .entrar { width: 100%; max-width: 22rem; height: 4rem; font-size: 1.25rem; }
  .rodape { padding-top: 1.1rem; padding-bottom: 1.6rem; }
  .site { font-size: .9rem; padding-inline: 1.15rem; white-space: nowrap; }

  @keyframes fio    { from { transform: scaleX(0); opacity: 0; } }
  @keyframes sai-esq { from { opacity: 0; transform: translateY(.8rem); } }
  @keyframes sai-dir { from { opacity: 0; transform: translateY(-.8rem); } }
}
