/* =============================================================================
   VibeCore — legal.css
   Estilos das páginas legais e de suporte. Reutiliza os tokens de styles.css
   (carregar styles.css ANTES deste ficheiro). Estética: céu noturno + cartão
   de documento branco, numeração de marca, tom premium e calmo.
   ========================================================================== */

/* O fundo escuro contínuo é fornecido por .legalbg (estrelas Lottie atrás). */
.legalbg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, #3A226C 0%, #241856 45%, #160E33 100%);
}
.legalbg__stars { position: absolute; inset: 0; opacity: 0.5; }
body.legal {
  background: var(--sky-deepest);
  min-height: 100vh;
}

/* ---------------------------------------------------------------- NAVBAR */
.lnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(22,14,51,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(201,190,232,0.10);
}
.lnav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.lnav__back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-on-dark); font-size: 0.92rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--r-pill);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.lnav__back:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.lnav__right { display: flex; align-items: center; gap: 10px; }

/* Seletor de idioma (reutiliza visual do site) */
.llang { position: relative; }
.llang__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,190,232,0.18);
  color: var(--white); font-size: 0.86rem; font-weight: 600;
  transition: border-color 0.18s var(--ease);
}
.llang__btn:hover { border-color: rgba(242,133,78,0.5); }
.llang__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 140px; padding: 6px;
  background: #241856; border: 1px solid rgba(201,190,232,0.18);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  list-style: none; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0.16s;
}
.llang.is-open .llang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.llang__menu li {
  padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer;
  color: var(--text-on-dark); font-size: 0.9rem;
}
.llang__menu li:hover, .llang__menu li[aria-selected="true"] { background: rgba(242,133,78,0.16); color: var(--white); }

/* ----------------------------------------------------------------- HEADER */
.lhead { text-align: center; padding: clamp(48px, 8vw, 88px) 0 16px; }
.lhead__badge {
  display: inline-block; padding: 6px 16px; border-radius: var(--r-pill);
  background: rgba(242,133,78,0.14); border: 1px solid rgba(242,133,78,0.3);
  color: var(--orange-soft); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 22px;
}
.lhead__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05;
  color: var(--white); letter-spacing: -0.02em;
}
.lhead__title em { font-style: italic; color: var(--orange-soft); }
.lhead__updated { margin-top: 16px; color: var(--text-on-dark); font-size: 0.9rem; }
.lhead__intro {
  max-width: 680px; margin: 22px auto 0; padding: 0 var(--gutter);
  color: var(--text-on-dark); font-size: 1.02rem; line-height: 1.7;
}

/* ----------------------------------------------------------- DOC CARD */
.ldoc {
  max-width: 860px; margin: clamp(28px, 5vw, 48px) auto clamp(60px, 10vw, 110px);
  padding: clamp(28px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: var(--r-xl);
  box-shadow: 0 40px 90px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
}
.lsec { padding: 26px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.lsec:first-child { border-top: 0; padding-top: 4px; }
.lsec__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.lsec__n {
  flex-shrink: 0;
  font-family: var(--serif); font-weight: 600; font-style: italic;
  font-size: 1.15rem; color: var(--orange);
  min-width: 34px;
}
.lsec__h {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.5rem); color: var(--white); line-height: 1.2;
  letter-spacing: -0.01em;
}
.lsec__body { padding-left: 48px; }
.lsec__body p { color: var(--text-on-dark); font-size: 1rem; line-height: 1.72; margin-bottom: 12px; }
.lsec__body p:last-child { margin-bottom: 0; }
.lsec__body a { color: var(--orange); font-weight: 600; word-break: break-word; }
.lsec__body a:hover { text-decoration: underline; }

.llist { list-style: none; margin: 8px 0 14px; display: grid; gap: 9px; }
.llist li {
  position: relative; padding-left: 26px;
  color: var(--text-on-dark); font-size: 0.98rem; line-height: 1.6;
}
.llist li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--orange-soft); transform: rotate(45deg);
}
.lnote {
  margin: 14px 0 4px; padding: 16px 18px;
  background: rgba(242,133,78,0.08);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: #E4C6B0; font-size: 0.95rem; line-height: 1.62;
}
.lclosing {
  margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--text-gray); font-size: 0.95rem; line-height: 1.7; font-style: italic;
}

@media (max-width: 640px) {
  .lsec__body { padding-left: 0; }
  .lsec__head { gap: 10px; }
}

/* ===================================================== SUPPORT-SPECIFIC */
.lsupport { max-width: 980px; margin: 0 auto clamp(60px,10vw,110px); padding: 0 var(--gutter); }

/* Grelha de tópicos */
.ltopics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: clamp(28px,5vw,44px) 0;
}
.ltopic {
  padding: 24px; border-radius: var(--r-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,190,232,0.14);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.ltopic:hover { transform: translateY(-3px); border-color: rgba(242,133,78,0.4); background: rgba(255,255,255,0.07); }
.ltopic__icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(230,95,43,0.16); color: var(--orange-soft);
}
.ltopic__h { font-family: var(--serif); font-weight: 600; font-size: 1.16rem; color: var(--white); margin-bottom: 8px; }
.ltopic__p { color: var(--text-on-dark); font-size: 0.92rem; line-height: 1.6; }

/* FAQ acordeão */
.lfaq { max-width: 760px; margin: clamp(36px,6vw,56px) auto; }
.lfaq__title, .lform__title {
  text-align: center; font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--white); margin-bottom: 28px;
  letter-spacing: -0.01em;
}
.lacc { border-radius: var(--r-lg); overflow: hidden; border: 1px solid rgba(201,190,232,0.14); }
.lacc__item { border-top: 1px solid rgba(201,190,232,0.12); }
.lacc__item:first-child { border-top: 0; }
.lacc__btn {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; background: rgba(255,255,255,0.04); color: var(--white);
  font-size: 1.02rem; font-weight: 600; font-family: var(--sans);
  transition: background 0.18s var(--ease);
}
.lacc__btn:hover { background: rgba(255,255,255,0.07); }
.lacc__btn .lacc__icon { flex-shrink: 0; transition: transform 0.24s var(--ease); color: var(--orange-soft); }
.lacc__item.is-open .lacc__icon { transform: rotate(45deg); }
.lacc__panel { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
.lacc__panel-inner { padding: 4px 22px 22px; color: var(--text-on-dark); font-size: 0.96rem; line-height: 1.7; }

/* Formulário de contacto (mailto) */
.lform { max-width: 680px; margin: clamp(40px,6vw,64px) auto 0; }
.lform__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; margin-bottom: 26px; }
.lform__chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(201,190,232,0.14);
  color: var(--text-on-dark); font-size: 0.86rem;
}
.lform__chip svg { color: var(--orange-soft); }
.lform__intro { text-align: center; color: var(--text-on-dark); margin-bottom: 26px; line-height: 1.65; }
.lform__card {
  padding: clamp(24px,4vw,38px); border-radius: var(--r-xl);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(201,190,232,0.16);
  box-shadow: var(--shadow-lg);
}
.lfield { margin-bottom: 18px; }
.lfield label { display: block; margin-bottom: 8px; color: var(--white); font-size: 0.9rem; font-weight: 600; }
.lfield input, .lfield textarea {
  width: 100%; padding: 14px 16px;
  background: rgba(22,14,51,0.5); border: 1.5px solid rgba(201,190,232,0.2);
  border-radius: var(--r-md); color: var(--white); font-family: var(--sans); font-size: 1rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.lfield input::placeholder, .lfield textarea::placeholder { color: rgba(201,190,232,0.5); }
.lfield input:focus, .lfield textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(230,95,43,0.18);
}
.lfield textarea { min-height: 150px; resize: vertical; }
.lform__error { color: var(--orange-soft); font-size: 0.88rem; margin: -8px 0 14px; min-height: 1.1em; }
.lform__send {
  width: 100%; min-height: 56px; gap: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); font-size: 1.05rem; font-weight: 700;
  background: linear-gradient(135deg, var(--orange-soft), var(--orange));
  color: var(--white); box-shadow: var(--shadow-orange);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.lform__send:hover { transform: translateY(-2px); box-shadow: 0 20px 46px rgba(230,95,43,0.4); }
.lform__send:active { transform: translateY(0); }
.lform__note { text-align: center; margin-top: 16px; color: var(--text-on-dark); font-size: 0.84rem; }

@media (max-width: 860px) { .ltopics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ltopics { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- FOOTER */
/* As páginas legais usam agora o rodapé completo (.footer) do site. Garante
   que fica acima do fundo fixo e mantém os atalhos legíveis. */
.lfooter-full { position: relative; z-index: 1; }

/* Movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .legalbg__stars { display: none; }
  .ltopic, .lform__send, .lacc__panel, .lacc__icon { transition: none !important; }
}
