/* Nuvia — www.nuvia.cards
 *
 * Uma página só, escura como o banner. As cores saem das imagens: o violeta
 * da noite ao fundo, as arestas néon dos ícones (magenta → violeta → azul) e o
 * dourado do logótipo.
 */

@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 300 500;
  font-display: swap;
}

:root {
  --bg: #0c0518;
  --bg-raised: #140a27;
  --text: #f4effc;
  --muted: #bdb2da;
  --faint: #9187b6;
  --gold: #f3c98b;
  --gold-deep: #e39a57;
  --edge: linear-gradient(155deg, #ff4fd8 0%, #8a5cff 52%, #3f7bff 100%);
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(60% 40% at 50% 62%, rgba(110, 50, 200, 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

/* Enquanto o site.js não pôs o texto na língua certa. */
.i18n [data-i18n],
.i18n .stores {
  visibility: hidden;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ topo */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(200, 80, 255, 0.35);
}

.langs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(12, 5, 24, 0.55);
  border: 1px solid rgba(190, 150, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.langs button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 6px 11px;
  min-height: 32px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.langs button:hover {
  color: var(--text);
}

.langs button[aria-pressed="true"] {
  color: #1a0b2e;
  background: linear-gradient(180deg, #ffe3bd, var(--gold));
}

/* ------------------------------------------------------------------ hero */

/* O banner é desenhado para 2000×761. O texto vai por cima, no espaço entre
 * o logótipo e as cartas, por isso as medidas são proporções da imagem: em
 * cqw (largura do hero), com vw para quem não conhece container queries. */
.hero {
  position: relative;
  container-type: inline-size;
}

.hero picture {
  position: relative;
  display: block;
}

.hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 2000 / 761;
}

/* O banner funde-se com o fundo da página. Fica na imagem e não no .hero,
 * porque no telemóvel o texto passa para baixo dela e ficava tapado. */
.hero picture::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 16%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 33.7%;
  width: 62%;
  transform: translateX(-50%);
  text-align: center;
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}

.tagline,
.topics {
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

/* O espaçamento entre letras também fica depois da última; o recuo do mesmo
 * tamanho à esquerda devolve o centro à frase. */
.tagline {
  font-weight: 300;
  font-size: 1.7vw;
  font-size: 1.7cqw;
  line-height: 1.25;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: #efe6ff;
  text-shadow: 0 0 0.5em rgba(185, 140, 255, 0.6), 0 0 1.6em rgba(120, 60, 230, 0.5);
}

.topics {
  margin-top: 0.7vw;
  margin-top: 0.7cqw;
  font-weight: 400;
  font-size: 1.06vw;
  font-size: 1.06cqw;
  line-height: 1.3;
  letter-spacing: 0.13em;
  text-indent: 0.13em;
  color: #ddd0f3;
  text-shadow: 0 0 0.6em rgba(150, 100, 255, 0.55);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 0.6vw);
  }
}

/* ------------------------------------------------------------------ apps */

.apps {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(64px, 8vw, 112px);
}

.section-head {
  max-width: 620px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

h2,
.soon-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff2dd 10%, var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.15;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 300;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  text-wrap: pretty;
}

.featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

/* Os cartões das apps têm a aresta néon dos ícones: um contorno em gradiente,
 * feito com uma máscara para ficar só a linha. */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 28px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(160, 70, 255, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(36, 16, 66, 0.85), rgba(17, 8, 33, 0.92));
  box-shadow: 0 40px 90px -50px rgba(140, 80, 255, 0.55);
}

.app::before,
.soon-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-icon {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 21px;
  box-shadow: 0 10px 40px -8px rgba(190, 80, 255, 0.55);
}

.app-kicker {
  margin: 0 0 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.app-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 27px);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.app-desc {
  margin: 22px 0 0;
  color: var(--text);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}

.app-features {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.app-features li {
  position: relative;
  padding: 7px 0 7px 26px;
  border-top: 1px solid rgba(190, 150, 255, 0.1);
  font-size: 16px;
  line-height: 1.45;
}

.app-features li:first-child {
  border-top: 0;
}

/* Uma estrela de quatro pontas, como a do logótipo. */
.app-features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 12px;
  height: 12px;
  background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 4px rgba(243, 201, 139, 0.7));
}

/* ---------------------------------------------------------------- lojas */

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 26px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 9px 16px 9px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #06030d;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.store svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.store span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.store small {
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.store b {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.01em;
}

a.store:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 26px -10px rgba(170, 90, 255, 0.8);
}

/* Sem link ainda: o botão fica, apagado, com a frase a dizer porquê. */
.store[aria-disabled="true"] {
  opacity: 0.42;
}

.store-note {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 14px;
}

/* ------------------------------------------------------------- em breve */

.soon-title {
  margin-top: clamp(56px, 7vw, 88px);
  font-size: clamp(22px, 2.4vw, 28px);
  text-align: center;
}

.soon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding: 0;
  list-style: none;
}

.soon-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 18px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 14, 56, 0.6), rgba(15, 7, 29, 0.75));
  text-align: center;
}

.soon-card::before {
  opacity: 0.22;
}

.soon-card img {
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 8px 30px -10px rgba(190, 80, 255, 0.5);
}

.soon-card h4 {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.04em;
}

.soon-card p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.45;
  text-wrap: pretty;
}

.pill {
  margin-top: auto;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(243, 201, 139, 0.4);
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------- rodapé */

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(190, 150, 255, 0.12);
  text-align: center;
}

.foot img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  opacity: 0.9;
}

.disclaimer {
  margin: 0;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.6;
  text-wrap: pretty;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  font-size: 14px;
}

.legal a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(189, 178, 218, 0.3);
  padding: 4px 0 1px;
}

.legal a:hover {
  color: var(--text);
  border-color: currentColor;
}

.copy {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------- tablet */

@media (max-width: 980px) {
  .soon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .featured {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------- móvel */

/* Num ecrã estreito o banner inteiro ficava com 140px de altura e o texto
 * por cima ilegível. Corta-se aos lados — fica o logótipo e as cartas do
 * meio — e o texto passa para baixo da imagem. */
@media (max-width: 760px) {
  .hero img {
    aspect-ratio: 1.08;
    object-fit: cover;
    object-position: 50% 0;
  }

  .hero picture::after {
    height: 30%;
  }

  .hero-copy {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin-top: -14vw;
    padding: 0 var(--gutter);
    transform: none;
    animation-name: rise-m;
  }

  .tagline,
  .topics {
    white-space: normal;
    text-wrap: balance;
  }

  .tagline {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }

  .topics {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.9;
    letter-spacing: 0.12em;
    text-indent: 0.12em;
    color: var(--muted);
  }

  .apps {
    padding-top: 56px;
  }

  .app-icon {
    width: 72px;
    height: 72px;
    border-radius: 17px;
  }

  .app-desc {
    font-size: 17px;
  }

  .store {
    flex: 1 1 128px;
    min-width: 0;
    gap: 8px;
    padding: 8px 10px;
  }

  .store small {
    font-size: 10px;
  }

  .store b {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .langs button {
    padding: 6px 8px;
    font-size: 11px;
  }

  .soon {
    gap: 12px;
  }

  .soon-card {
    padding: 22px 12px 18px;
  }

  .soon-card img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .soon-card p {
    font-size: 14px;
  }
}

@keyframes rise-m {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy {
    animation: none;
  }

  .store,
  .langs button {
    transition: none;
  }
}
