/* ══════════════════════════════════════════════════════════
   DEMO — camada de apresentação do template FISIO
   Tudo aqui tem prefixo .demo- (ou html.has-splash). Para entregar o site
   a um cliente, apagar do <head> do index.html as linhas <link demo.css>,
   <script demo.js> e a meta robots noindex. Nenhum estilo do site depende
   deste arquivo.

   Duas partes: a faixa fixa (usa a paleta do template) e o splash de
   boas-vindas (usa a identidade da flux, de propósito: é a flux falando).
   ══════════════════════════════════════════════════════════ */
:root {
  --demo-bar: 60px;
  --demo-cafe: #081E17;      /* floresta */
  --demo-creme: #F5F0E7;     /* creme */
  --demo-vinho: #1B6F54;     /* verde (ação) */
  --demo-corpo: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* identidade da flux (landing) */
  --flux-papel: #FBF8F0;
  --flux-creme: #EAE3D0;
  --flux-oliva: #607743;
  --flux-musgo: #3F4D2B;
}
@media (max-width: 560px) { :root { --demo-bar: 58px; } }
html.has-demo-bar body { padding-bottom: var(--demo-bar); }

.demo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* ── splash aberto: o site fica escondido (e fora do foco) por trás ──
   O hero espera: o GSAP fica pausado até o splash fechar. Sem este arquivo, nada disso existe. */
html.has-splash { overflow: hidden; }
html.has-splash body { visibility: hidden; }

/* ── faixa fixa ─────────────────────────────────────────── */
.demo-bar { font-family: var(--demo-corpo); font-size: 16px; line-height: 1.45; }
.demo-bar *, .demo-splash *, .demo-splash *::before, .demo-splash *::after { box-sizing: border-box; }
.demo-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; height: var(--demo-bar);
  background: var(--demo-cafe); color: var(--demo-creme);
  display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 16px;
  box-shadow: 0 -8px 24px rgba(8,30,23,.25);
}
.demo-bar p { margin: 0; font-size: 15px; }
.demo-bar strong { color: #fff; }
.demo-bar__acoes { display: flex; gap: 10px; align-items: center; }

.demo-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 2px solid var(--demo-creme); background: transparent; color: var(--demo-creme);
  font: 700 15px/1 var(--demo-corpo); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.demo-btn:hover { background: var(--demo-creme); color: var(--demo-cafe); }
.demo-btn--principal { background: var(--demo-creme); color: var(--demo-cafe); }
.demo-btn--principal:hover { background: #fff; border-color: #fff; }
.demo-bar .demo-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 700px) {
  .demo-bar { gap: 10px; padding: 0 10px; }
  .demo-bar p span { display: none; }
  .demo-bar p { font-size: 14px; line-height: 1.2; }
  .demo-btn { padding: 0 14px; font-size: 14px; }
}
@media (max-width: 400px) { .demo-bar p { display: none; } .demo-bar__acoes { width: 100%; } .demo-bar__acoes .demo-btn { flex: 1; } }

/* ── splash de boas-vindas ──────────────────────────────── */
@font-face { font-family: 'Signika'; font-style: normal; font-weight: 600; font-display: swap; src: url('./flux/signika-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('./flux/fira-sans-latin-400-normal.woff2') format('woff2'); }

.demo-splash {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  background: radial-gradient(130% 70% at 50% 0%, #fff 0%, var(--flux-papel) 48%, var(--flux-creme) 100%);
  color: var(--flux-musgo);
  font-family: 'Fira Sans', 'Trebuchet MS', system-ui, sans-serif; font-size: 16px; line-height: 1.5;
  transition: opacity .32s ease;
}
.demo-splash[hidden] { display: none; }
.demo-splash:focus { outline: none; }
.demo-splash.is-saindo { opacity: 0; pointer-events: none; }

/* o miolo rola sozinho em tela muito baixa; o botão fica sempre à vista embaixo.
   margin auto no 1º e no último filho centra sem cortar o topo quando falta espaço */
.demo-splash__in {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; width: 100%; max-width: 36rem; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 28px 8px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(10px, 2.2svh, 20px);
}
.demo-splash__in > :first-child { margin-top: auto; }
.demo-splash__in > :last-child { margin-bottom: auto; }

.demo-splash__logo { flex: none; height: clamp(96px, 21svh, 156px); width: auto; }
.demo-splash h2 {
  margin: 0; font: 600 clamp(1.9rem, 8.4vw, 2.6rem)/1.08 'Signika', 'Trebuchet MS', sans-serif; letter-spacing: -.005em;
}
.demo-splash__texto { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.6svh, 14px); }
.demo-splash p { margin: 0; max-width: 29rem; font-size: clamp(1rem, 4.4vw, 1.1875rem); line-height: 1.55; text-wrap: pretty; }
.demo-splash .demo-splash__obrigado { font: 600 1.125rem/1.3 'Signika', 'Trebuchet MS', sans-serif; }
.demo-splash .demo-splash__aviso {
  max-width: 24rem; padding-top: 12px; font-size: .8125rem; line-height: 1.4; color: #4E5D3A;
  border-top: 1px solid rgba(63,77,43,.22);
}
.demo-splash .demo-splash__aviso strong { font-weight: 600; font-family: 'Signika', 'Trebuchet MS', sans-serif; }

.demo-splash__rodape { flex: none; display: flex; justify-content: center; padding: 14px 28px calc(22px + env(safe-area-inset-bottom)); }
.demo-splash__btn {
  appearance: none; border: 0; cursor: pointer; width: min(100%, 22rem); min-height: 54px; padding: 0 32px; border-radius: 999px;
  background: var(--flux-musgo); color: var(--flux-papel);
  font: 600 1.125rem/1 'Signika', 'Trebuchet MS', sans-serif;
  box-shadow: 0 10px 24px -10px rgba(63,77,43,.65);
  transition: background-color .15s, transform .15s;
}
.demo-splash__btn:hover { background: var(--flux-oliva); }
.demo-splash__btn:active { transform: scale(.98); }
.demo-splash__btn:focus-visible { outline: 3px solid var(--flux-oliva); outline-offset: 3px; }

/* celular baixo (ex.: 320×568): compacta pra tudo caber sem rolar e o botão seguir à vista */
@media (max-height: 620px) {
  .demo-splash__in { gap: 8px; padding-top: max(10px, env(safe-area-inset-top)); }
  .demo-splash__logo { height: 78px; }
  .demo-splash h2 { font-size: 1.7rem; }
  .demo-splash p { font-size: .9375rem; line-height: 1.5; }
  .demo-splash__texto { gap: 6px; }
  .demo-splash .demo-splash__obrigado { font-size: 1.0625rem; }
  .demo-splash .demo-splash__aviso { padding-top: 8px; font-size: .75rem; }
  .demo-splash__rodape { padding-top: 10px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .demo-splash__btn { min-height: 50px; }
}

@media (prefers-reduced-motion: no-preference) {
  .demo-splash__in > *, .demo-splash__rodape { animation: demo-entra .6s cubic-bezier(.2,.7,.2,1) both; }
  .demo-splash__in > :nth-child(2) { animation-delay: .08s; }
  .demo-splash__in > :nth-child(3) { animation-delay: .16s; }
  .demo-splash__in > :nth-child(4) { animation-delay: .24s; }
  .demo-splash__rodape { animation-delay: .32s; }
}
@keyframes demo-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .demo-splash { transition: none; } }
