/*
 * bio.riia.pt — restauro geométrico do código original fornecido pela RIIA
 * (extraído do <style> inline da página live em bio.riia.pt). As regras
 * abaixo replicam esse código quase literalmente: mesmas variáveis, mesmos
 * valores de padding/radius/min-height/gap, mesmos breakpoints. Só há
 * alterações pontuais, cada uma assinalada com um comentário "ALTERAÇÃO":
 *   1. logo — asset oficial do projeto em vez do PNG original;
 *   2. título — line-height/letter-spacing ligeiramente mais respirados;
 *   3. .card — fundo translúcido real + backdrop-filter (glass "a sério");
 *   4. dois glows animados atrás do cartão (novo, pedido nesta ronda);
 *   5. tipografia auto-hospedada localmente (Google Fonts não é usado).
 *
 * Este ficheiro NÃO usa os tokens do design system do Ecossistema
 * (--riia-*) para geometria/cor — as variáveis abaixo são as do código
 * original da RIIA, mantidas tal como estavam.
 */

/* ALTERAÇÃO 5 — mesma tipografia (Poppins), mas auto-hospedada localmente
   em vez de carregada via Google Fonts, como já era prática neste projeto. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/poppins-800.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/poppins-900.woff2") format("woff2");
}

:root {
  --bg: #0f0f0f;
  --bg-deep: #090909;
  --white: #ffffff;
  --text: #ffffff;
  --muted: #d0d0d0;
  --muted-soft: #9c9c9c;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);
  --orange: #ff5a00;
  --orange-dark: #e85000;
  --purple: #6e2ee8;
  --purple-dark: #5417c4;
  --white-glow: rgba(255, 255, 255, 0.85);
  --card: #111111;
  --radius-lg: 30px;
  --radius-md: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --max: 480px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 4%, rgba(255, 90, 0, 0.22), transparent 23%),
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 14px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 14px;
  z-index: 10;
  padding: 8px 16px;
  background: var(--white);
  color: #0c0c0c;
  border-radius: 10px;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 14px;
}

/* ALTERAÇÃO 4 — três glows grandes e muito lentos, fixos ao viewport, atrás
 * do cartão (laranja e roxo em body::before/::after, um terceiro glow claro
 * e mais subtil em html::before — sem acrescentar elementos ao HTML). Cada
 * um tem o seu próprio percurso em loop fechado (0% e 100% coincidem, para
 * não haver "salto" no fim do ciclo), com vários pontos intermédios
 * assimétricos, durações diferentes (24s / 31s / 37s) e easings próprios,
 * para que o movimento pareça orgânico em vez de um ping-pong mecânico.
 * O cartão passa a ter fundo translúcido + blur (ver .card), por isso este
 * movimento fica claramente percetível através do vidro sem nunca competir
 * com o conteúdo.
 */
body::before,
body::after,
html::before {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

body::before {
  width: 64vmax;
  height: 64vmax;
  top: -22vmax;
  left: -20vmax;
  opacity: 0.36;
  filter: blur(85px);
  background: radial-gradient(circle, var(--orange), transparent 70%);
  animation: glow-drift-a 24s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

body::after {
  width: 64vmax;
  height: 64vmax;
  bottom: -24vmax;
  right: -20vmax;
  opacity: 0.32;
  filter: blur(85px);
  background: radial-gradient(circle, var(--purple), transparent 70%);
  animation: glow-drift-b 31s cubic-bezier(0.33, 0, 0.67, 1) infinite;
}

html::before {
  width: 46vmax;
  height: 46vmax;
  top: 8vmax;
  left: 18vmax;
  opacity: 0.12;
  filter: blur(100px);
  background: radial-gradient(circle, var(--white-glow), transparent 72%);
  animation: glow-drift-c 37s ease-in-out infinite;
}

/* Percursos em loop fechado (0% = 100%) com pontos intermédios não
 * simétricos — cada glow entra e sai de zonas diferentes do ecrã, cruzando-se
 * ocasionalmente com os outros em vez de seguir uma órbita previsível. */
@keyframes glow-drift-a {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.36;
  }
  20% {
    transform: translate(8vw, 4vh) scale(1.06);
    opacity: 0.4;
  }
  45% {
    transform: translate(13vw, 12vh) scale(0.95);
    opacity: 0.3;
  }
  68% {
    transform: translate(5vw, 16vh) scale(1.05);
    opacity: 0.37;
  }
  88% {
    transform: translate(-4vw, 7vh) scale(0.98);
    opacity: 0.33;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.36;
  }
}

@keyframes glow-drift-b {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.32;
  }
  18% {
    transform: translate(-7vw, -9vh) scale(1.05);
    opacity: 0.36;
  }
  42% {
    transform: translate(-15vw, -4vh) scale(0.93);
    opacity: 0.27;
  }
  66% {
    transform: translate(-8vw, 7vh) scale(1.07);
    opacity: 0.34;
  }
  85% {
    transform: translate(3vw, -3vh) scale(0.99);
    opacity: 0.3;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.32;
  }
}

@keyframes glow-drift-c {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.12;
  }
  25% {
    transform: translate(6vw, -6vh) scale(1.1);
    opacity: 0.16;
  }
  55% {
    transform: translate(-5vw, -11vh) scale(0.9);
    opacity: 0.1;
  }
  80% {
    transform: translate(-9vw, -2vh) scale(1.05);
    opacity: 0.14;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.12;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  html::before {
    animation: none;
  }
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
}

.card {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  /* ALTERAÇÃO 3 — vidro fosco real: base bem mais translúcida (.72 → .46)
   * e backdrop-filter mais forte (blur 20px → 30px, + saturate para o
   * "vidro" não ficar lavado/cinzento), para que os glows do fundo se
   * vejam claramente através do cartão. O gradiente subtil de brilho no
   * topo mantém-se, só ligeiramente mais presente. */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(15, 15, 15, 0.46);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  box-shadow: var(--shadow);
  padding: 18px;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
      rgba(15, 15, 15, 0.94);
  }
}

.card::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -132px;
  top: -124px;
  border-radius: 999px;
  background: rgba(255, 90, 0, 0.16);
  filter: blur(8px);
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 72%;
  right: 36px;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  margin-bottom: 34px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

/*
 * ALTERAÇÃO 1 — logo oficial do projeto (assets/brand/riia-logo-dark.svg)
 * em vez do PNG original. O mark ocupa só uma faixa fina no centro do
 * canvas quadrado 512x512 do SVG (bbox real: x 50.8-461.3, y 202-310), por
 * isso a imagem de fundo é ampliada/reposicionada para mostrar só essa
 * faixa (com pequena margem) — mesmo tratamento usado noutros pontos do
 * projeto. width/height calculados para dar a MESMA presença visual do
 * logo original (82x23px), sem alterar a altura da topbar.
 */
.logo {
  display: block;
  width: 82px;
  height: 23px;
  background-image: url("../brand/riia-logo-dark.svg");
  background-repeat: no-repeat;
  background-size: 100px 100px;
  background-position: -9.2px -38.8px;
}

.hero {
  position: relative;
  z-index: 1;
  padding: 0 6px 23px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 390px;
  font-size: clamp(34px, 10.5vw, 52px);
  /* ALTERAÇÃO 2 — mais respiro (line-height 1.03 → 1.12, letter-spacing
   * -0.055em → -0.03em), sem tocar no tamanho da fonte nem na largura do
   * painel. */
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.intro {
  margin: 18px 0 0;
  max-width: 390px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}

nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  margin-top: 6px;
}

.link-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 15px 14px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  color: var(--white);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
  outline: none;
}

.link-button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 18px 34px rgba(255, 90, 0, 0.24);
}

.link-button.primary:hover,
.link-button.primary:focus-visible {
  box-shadow: 0 22px 42px rgba(255, 90, 0, 0.31);
}

.button-copy {
  display: grid;
  gap: 3px;
}

.label {
  font-size: 15px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.description {
  color: var(--muted-soft);
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 400;
}

.primary .description {
  color: rgba(255, 255, 255, 0.84);
}

.arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.09);
  color: var(--white);
  font-size: 19px;
  line-height: 1;
  font-weight: 700;
}

.primary .arrow {
  background: rgba(255, 255, 255, 0.2);
}

footer {
  position: relative;
  z-index: 1;
  padding: 18px 6px 2px;
  text-align: center;
  color: var(--muted-soft);
  font-size: 12px;
  line-height: 1.4;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  body {
    padding: 34px 20px;
  }

  .card {
    min-height: auto;
  }
}

@media (max-width: 360px) {
  body {
    padding: 14px 10px;
  }

  .card {
    padding: 14px;
  }

  .topbar {
    margin-bottom: 28px;
  }

  h1 {
    font-size: 32px;
  }

  .description {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-button {
    transition: none;
  }

  .link-button:hover,
  .link-button:focus-visible {
    transform: none;
  }

  .skip-link {
    transition: none;
  }
}
