/* ==========================================================
   Boarding Pass do Novo Futuro · Altis Lisboa / ONF
   Azul-noite + creme + areia (acento pequeno). Rizoma + Helvetica.
   Serve também o aviso-de-privacidade.html.
   ========================================================== */

@font-face { font-family: "Rizoma"; src: url("assets/fonts/RizomaM-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Rizoma"; src: url("assets/fonts/RizomaM-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Helvetica ALTIS"; src: url("assets/fonts/Helvetica.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica ALTIS"; src: url("assets/fonts/Helvetica-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --noite: #000827;
  --azul: #010742;
  --azul-2: #050E50;
  --creme: #FBF7EE;
  --creme-90: rgba(251, 247, 238, .9);
  --creme-75: rgba(251, 247, 238, .78);
  --creme-60: rgba(251, 247, 238, .62);
  --creme-12: rgba(251, 247, 238, .12);
  --areia: #F8DBA9;
  --areia-50: rgba(248, 219, 169, .5);
  --areia-25: rgba(248, 219, 169, .25);
  --font-title: "Rizoma", Georgia, "Times New Roman", serif;
  --font-body: "Helvetica ALTIS", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-reveal: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--azul); }
body {
  margin: 0; min-width: 320px; background: var(--azul); color: var(--creme);
  font-family: var(--font-body); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--areia); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 10px; background: var(--creme); color: var(--azul); font-weight: 700; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- monograma (areia via máscara) ---------- */
.mono { display: block; background: var(--areia); -webkit-mask: url("assets/logos/logo-onf-light.svg") center / contain no-repeat; mask: url("assets/logos/logo-onf-light.svg") center / contain no-repeat; aspect-ratio: 451 / 559; }



/* rodapé padrão ALTIS (§8.3), compacto e discreto */
.site-footer {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); font-size: .74rem; color: var(--creme-60);
  border-top: 1px solid rgba(251, 247, 238, .1); background: rgba(0, 6, 30, .35);
}
.footer-company { display: flex; flex-direction: column; gap: 2px; line-height: 1.5; order: 2; }
.footer-company strong { font-weight: 700; font-size: .82rem; color: var(--creme); }
.footer-company .footer-copyright { margin-top: 6px; }
.footer-logo { order: 1; flex-shrink: 0; }
.footer-logo img { width: 36px; height: auto; opacity: .9; display: block; }
.footer-link {
  order: 3; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 22px; border-radius: 999px;
  border: 1px solid rgba(251, 247, 238, .22); color: var(--creme-90); text-decoration: none; font-size: .75rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap;
}
.footer-link:hover { color: var(--areia); border-color: var(--areia-50); }
@media (min-width: 860px) {
  .site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: left; padding: 16px 48px; gap: 24px; }
  .footer-company { order: 1; } .footer-logo { order: 2; } .footer-link { order: 3; justify-self: end; }
}


/* ==========================================================
   Aviso de privacidade
   ========================================================== */
.legal-page { padding: 40px 16px 72px; background: linear-gradient(180deg, var(--noite) 0%, var(--azul) 100%); }
.legal { max-width: 760px; margin: 0 auto; color: var(--creme-90); font-size: 1rem; line-height: 1.7; }
.legal__back { display: inline-flex; align-items: center; min-height: 48px; margin-bottom: 16px; color: var(--areia); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.legal__back:hover { text-decoration: underline; }
.legal__title { margin: 0 0 24px; color: var(--creme); font-family: var(--font-title); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 7vw, 3.2rem); line-height: 1.05; text-wrap: balance; }
.legal__meta { margin: 0 0 40px; padding: 20px 22px; border: 1px solid var(--areia-25); background: rgba(0, 8, 39, .5); border-radius: 14px; font-size: .9rem; }
.legal__meta div { margin: 2px 0; }
.legal__meta dt { display: inline; color: var(--creme); font-weight: 700; }
.legal__meta dd { display: inline; margin: 0; }
.legal section { padding-top: 28px; border-top: 1px solid var(--creme-12); margin-top: 28px; }
.legal h2 { margin: 0 0 14px; color: var(--creme); font-family: var(--font-title); font-weight: 400; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; }
.legal p { margin: 0 0 14px; }
.legal ul { list-style: none; margin: 0 0 14px; padding-left: 1.6em; }
.legal li { margin: 0 0 8px; }
.legal strong { color: var(--creme); }
.legal .n { color: var(--areia); font-weight: 700; margin-right: .25em; }
.legal a { color: var(--areia); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.legal-page + .site-footer { background: rgba(0, 6, 30, .92); }

/* ==========================================================
   V2 · ESTILO HUBLA (mesma dinâmica, identidade ONF)
   Gate creme chapado, pílula-foto, círculo que nasce do knob,
   filme em canvas 1080x1920.
   ========================================================== */
:root { --papel: #FBF7EE; --ink: #010742; --ink-70: rgba(1, 7, 66, .72); --ink-20: rgba(1, 7, 66, .2); --painel: #8D8F88; }
html, body { background: var(--azul); }
body.is-film { overflow: hidden; }

/* ---------- gate ---------- */
.gate { position: relative; background: var(--papel); color: var(--ink); display: flex; flex-direction: column; }
.gate.revelado { background: var(--azul); } /* troca instantânea: o texto escuro some por contraste */
.gate__main {
  flex: 1 0 auto; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: clamp(14px, 3svh, 30px) 4vw clamp(14px, 2.6svh, 26px); text-align: center; gap: 2svh;
}
.gate__top { display: flex; flex-direction: column; align-items: center; gap: clamp(4px, 1.2svh, 12px); }
.gate__mono { height: clamp(34px, 6.4svh, 66px); background: var(--ink); opacity: 0; animation: pousa 1.1s var(--ease-out) .2s forwards; }
.gate__hello { font-family: var(--font-title); font-style: italic; font-size: clamp(1rem, 2.4svh, 1.35rem); letter-spacing: -.01em; max-width: 24ch; overflow-wrap: anywhere; text-wrap: balance; line-height: 1.2; margin-top: clamp(2px, .8svh, 8px); }
.gate__title { font-family: var(--font-title); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; font-size: clamp(1.7rem, 5.6svh, 3.6rem); line-height: 1.04; max-width: 14ch; text-wrap: balance; }
.gate__sub { font-size: clamp(.95rem, 2.1svh, 1.15rem); color: var(--ink-70); max-width: 28ch; text-wrap: balance; line-height: 1.3; }
.gate__sig { font-family: var(--font-title); text-transform: uppercase; letter-spacing: .22em; font-size: clamp(.9rem, 2.2svh, 1.2rem); min-height: 1.3em; }
@keyframes pousa { from { opacity: 0; transform: translate(-40px, 40px) rotate(45deg); } to { opacity: 1; transform: none; } }

/* palavra a palavra em máscara de linha */
.mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.mask > .w { display: inline-block; transform: translateY(105%); animation: sobe .9s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes sobe { to { transform: none; } }

/* ---------- toggle: a pílula é o herói ---------- */
.gate__mid { width: 100%; display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.8svh, 20px); }
.tgwrap { position: relative; width: var(--tw); --tw: min(92vw, 820px, 62svh); opacity: 0; transform: scale(.92); animation: entra 1s var(--ease-out) .55s forwards; }
@keyframes entra { to { opacity: 1; transform: none; } }
.toggle {
  position: relative; display: block; width: 100%; aspect-ratio: 2.12; padding: 0; border: 0; border-radius: 999px; overflow: hidden;
  background: #1C2329; touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; cursor: grab; isolation: isolate;
}
.toggle.is-drag { cursor: grabbing; }
.toggle:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.toggle__foto {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; pointer-events: none;
  filter: grayscale(1) brightness(.55) contrast(1.1); transform: scale(1.12);
  transition: filter 1.1s var(--ease-out), transform 1.6s var(--ease-out);
}
.toggle[aria-checked="true"] .toggle__foto { filter: none; transform: scale(1); }
.toggle__estado {
  position: absolute; right: 9%; top: 50%; translate: 0 -50%; z-index: 1; color: var(--creme); opacity: .85; letter-spacing: -.02em;
  font-size: clamp(.9rem, 2.6vw, 1.5rem); white-space: nowrap; pointer-events: none; transition: opacity .3s;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.toggle[aria-checked="true"] .toggle__estado { opacity: 0; }
.toggle__knob {
  position: absolute; z-index: 2; left: 6.5%; top: 12%; height: 76%; aspect-ratio: 1; border-radius: 50%; background: var(--areia);
  transform: translateX(var(--x, 0px)); transition: transform .8s var(--spring); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); pointer-events: none;
}
.toggle.is-drag .toggle__knob { transition: none; }
.toggle__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--areia); opacity: 0; animation: pulsa 1.8s ease-out 1.6s infinite; }
.toggle[aria-checked="true"] .toggle__ring { animation: none; opacity: 0; }
@keyframes pulsa { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.toggle__dica { font-size: clamp(.9rem, 1.8svh, 1.05rem); color: var(--ink-70); opacity: 0; animation: fade .8s ease-out 1.6s forwards; }
.toggle__dica.off { animation: none; opacity: 0; }
@keyframes fade { to { opacity: 1; } }
.ghost { position: absolute; left: 0; top: 0; width: 34px; height: 34px; pointer-events: none; opacity: 0; z-index: 3; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }

/* rodapé padrão Altis no gate: discreto, abaixo do toggle */
.gate .site-footer { background: transparent; color: var(--ink-70); border-top: 1px solid var(--ink-20); gap: 10px; padding-top: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.gate .footer-company strong { color: var(--ink); }
.gate .footer-logo { width: 34px; height: 33px; background: var(--ink); -webkit-mask: url("assets/logos/altis-logo-vertical-creme.svg") center / contain no-repeat; mask: url("assets/logos/altis-logo-vertical-creme.svg") center / contain no-repeat; opacity: .9; }
.gate .footer-link { border-color: var(--ink-20); color: var(--ink); }
.gate .footer-link:hover { color: var(--ink); border-color: var(--ink); }
@media (min-width: 860px) {
  .gate { height: 100vh; height: 100svh; }
  .gate__main { min-height: 0; flex: 1 1 auto; }
  .gate .site-footer { padding-top: 10px; padding-bottom: 10px; font-size: .7rem; gap: 20px; }
  .gate .footer-company { gap: 0; line-height: 1.4; }
}

/* ---------- filme ---------- */
.film { position: fixed; inset: 0; z-index: 5; background: var(--azul); visibility: hidden; overflow: hidden; clip-path: circle(0 at 50% 50%); }
.film.is-on { visibility: visible; }
.film.is-open { clip-path: none; }
.film__mirror { position: absolute; left: -6%; top: -6%; width: 112%; height: 112%; filter: blur(48px) brightness(.38) saturate(1.2); pointer-events: none; }
.film__scroll { position: absolute; inset: 0; overflow: hidden; -webkit-overflow-scrolling: touch; }
.film.is-done .film__scroll { overflow-y: auto; overscroll-behavior: contain; }
.stage { height: 100vh; height: 100svh; display: grid; place-items: center; }
#cv { width: min(100vw, calc(100svh * 9 / 16)); aspect-ratio: 9 / 16; height: auto; display: block; background: var(--azul); }
.fim { display: flex; justify-content: center; padding: 6px 16px calc(28px + env(safe-area-inset-bottom)); opacity: 0; transform: translateY(16px); visibility: hidden; transition: opacity .5s ease-out, transform .5s ease-out; }
.fim.is-on { opacity: 1; transform: none; visibility: visible; }
.fim__card { width: min(100%, 440px); padding: 22px 20px 16px; border-radius: 22px; background: rgba(1, 7, 66, .72); border: 1px solid rgba(248, 219, 169, .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.fim__titulo { font-family: var(--font-title); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; line-height: 1.12; font-size: clamp(1.25rem, 5.4vw, 1.7rem); text-wrap: balance; max-width: 20ch; }
.fim__acoes { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.fim__linha { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(251, 247, 238, .35); background: transparent; color: var(--creme); font-weight: 700; font-size: .92rem; letter-spacing: .02em; text-wrap: balance; }
.btn:hover { border-color: var(--areia); }
.btn--primario { background: var(--areia); border-color: var(--areia); color: var(--azul); }
.btn--primario:hover { background: var(--creme); }
.btn--link { border-color: transparent; color: var(--creme-75); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.pronto { animation: pulsaBtn 1.4s ease-in-out infinite; }
@keyframes pulsaBtn { 50% { transform: scale(1.03); } }
.fim__aviso { min-height: 1.3em; font-size: .85rem; color: var(--areia); max-width: 32ch; text-wrap: balance; }
.fim__hash { font-weight: 700; letter-spacing: .2em; font-size: .72rem; color: var(--creme-60); text-transform: uppercase; }

.btn-som { position: absolute; z-index: 20; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(251, 247, 238, .3); background: rgba(1, 7, 66, .5); display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .3s; }
.btn-som svg { width: 22px; height: 22px; }
.btn-som .on { display: none; } .btn-som[aria-pressed="true"] .on { display: block; } .btn-som[aria-pressed="true"] .off { display: none; }
.btn-som.is-off { opacity: 0; pointer-events: none; }
.aviso-som { position: absolute; z-index: 21; left: 50%; bottom: 28%; translate: -50% 0; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--areia); color: var(--azul); font-weight: 700; font-size: 1.05rem; animation: pulsaBtn 1.4s ease-in-out infinite; }
.aviso-som[hidden] { display: none; }
.gravando { position: absolute; z-index: 22; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(1, 7, 66, .92), rgba(1, 7, 66, 0)); text-align: center; font-weight: 700; font-size: .95rem; }
.gravando[hidden] { display: none; }
.gravando i { display: block; height: 3px; margin: 10px auto 0; max-width: 440px; background: rgba(251, 247, 238, .2); border-radius: 2px; overflow: hidden; }
.gravando b { display: block; height: 100%; width: 100%; background: var(--areia); transform-origin: left; transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  .gate__mono, .tgwrap, .toggle__dica { animation-duration: .01ms !important; animation-delay: 0s !important; }
  .mask > .w { animation-duration: .01ms !important; animation-delay: 0s !important; }
  .toggle__ring { animation: none; }
  .toggle__knob, .toggle__foto { transition-duration: .2s !important; }
  .btn.pronto, .aviso-som { animation: none; }
  .fim { transition-duration: .2s; transform: none; }
}
