@font-face {
  font-family: 'Nicolara';
  src: url('/assets/nicolara-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --abyss: #000143;
  --deep: #00011f;
  --sapphire: #1c3ba6;
  --cream: #efebe3;
  --muted: #b9c6dc;
  --gutter: clamp(20px, 6vw, 96px);
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--abyss);
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: clip;
  padding: clamp(24px, 5vh, 48px) var(--gutter);
  background:
    radial-gradient(90% 70% at 72% -10%, rgba(28, 59, 166, .62), transparent 70%),
    linear-gradient(180deg, transparent 45%, var(--deep) 100%),
    var(--abyss);
  color: var(--cream);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.logo { display: block; width: clamp(150px, 15vw, 210px); height: auto; }

.betta {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -7vw;
  width: min(64vw, 118vh);
  height: auto;
  margin-top: calc(min(64vw, 118vh) * -.47);
  pointer-events: none;
  animation: surge 1.6s cubic-bezier(.16, 1, .3, 1) both, drift 11s ease-in-out 1.6s infinite alternate;
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 34rem;
  padding-block: clamp(32px, 6vh, 64px);
}

h1 {
  margin: 0;
  font-family: 'Nicolara', 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(2.35rem, min(5vw, 8.4vh), 4.6rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  text-transform: uppercase;
  max-width: 7.4em;
}

main p {
  margin: clamp(16px, 2.6vh, 24px) 0 0;
  max-width: 24em;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
}

main a {
  align-self: flex-start;
  margin-top: 24px;
  color: var(--cream);
  font-weight: 600;
  text-underline-offset: .25em;
}

a:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }

footer {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: .8125rem;
}

footer p { margin: 0; }

@keyframes surge {
  from { opacity: 0; transform: translate3d(5%, 4%, 0) scale(.97); }
  to { opacity: 1; transform: none; }
}

@keyframes drift {
  from { transform: none; }
  to { transform: translate3d(-1.4%, -1.6%, 0) rotate(-1.2deg); }
}

@media (max-aspect-ratio: 5/4) {
  /* O peixe recebe a altura que sobra depois da logo, do texto e do rodapé,
     para a página caber numa tela só com as barras do navegador visíveis. */
  body {
    --reserved: 300px;
    padding-block: 18px 14px;
  }
  body.erro { --reserved: 345px; }

  .logo { width: clamp(104px, 30vw, 170px); }

  .betta {
    position: relative;
    top: auto;
    right: auto;
    flex: none;
    align-self: flex-end;
    width: min(110vw, 760px, max(170px, (100vh - var(--reserved)) * 1.12));
    width: min(110vw, 760px, max(170px, (100svh - var(--reserved)) * 1.12));
    max-width: none;
    margin: 4px calc(var(--gutter) * -1 - 14vw) 8px 0;
  }

  main { flex: none; max-width: none; padding-block: 0 12px; }

  h1 {
    max-width: none;
    font-size: clamp(1.6rem, min(9.6vw, 5.6vh), 3rem);
    line-height: 1.08;
    text-wrap: balance;
  }

  main p {
    margin-top: 8px;
    max-width: 30em;
    font-size: clamp(.9375rem, 2.2vw, 1.125rem);
    line-height: 1.45;
    text-wrap: balance;
  }

  main a { margin-top: 10px; }

  footer {
    margin-top: auto;
    font-size: .75rem;
    line-height: 1.45;
    text-wrap: balance;
  }
}

/* Celular deitado: mantém o layout lateral, com tudo mais compacto. */
@media (max-height: 460px) and (min-aspect-ratio: 5/4) {
  body { padding-block: 14px 12px; }
  .logo { width: 96px; }
  main { padding-block: 8px; }
  h1 { font-size: 1.75rem; }
  main p { margin-top: 6px; font-size: .9375rem; line-height: 1.4; }
  main a { margin-top: 6px; }
  footer { max-width: 26rem; font-size: .75rem; line-height: 1.4; }
}

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