@font-face {
  font-family: Fredoka;
  src: url("fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --roxo: #7209b7;
  --rosa: #f72585;
  --verde: #06d6a0;
  --tinta: #1b1b2f;
  --branco: #fff;
  --lilas: #eadbff; /* running text on purple, a step quieter than white */
  --margem: clamp(1.5rem, 5vw, 4rem);
}

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

html {
  background: var(--roxo);
  color: var(--branco);
  font-family: Fredoka, ui-rounded, system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: hidden;
}

/* Layer lines along the bottom, as in the brand's posts: the print seen up close. */
body::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 9px, rgb(255 255 255 / 0.07) 9px 18px);
  mask-image: linear-gradient(to top, #000 35%, transparent);
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "texto fio";
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  width: min(100% - 2 * var(--margem), 72rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 10vh, 7rem) 2rem;
}

/* The symbol */

.fio {
  grid-area: fio;
  justify-self: center;
  width: min(100%, 34rem);
  height: auto;
  overflow: visible;
}

.anim .fio path {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation: fio-pronto 0s 4s forwards; /* shows it whole if the script never runs */
}

.anim .fio circle {
  opacity: 0;
  animation: bico-pronto 0s 4s forwards;
}

.fio.rodando path,
.fio.rodando circle {
  animation: none;
}

.fio.rodando circle {
  opacity: 1;
}

.fio.pronto circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pousa 0.4s ease-out;
}

@keyframes fio-pronto {
  to { stroke-dashoffset: 0; }
}

@keyframes bico-pronto {
  to { opacity: 1; }
}

@keyframes pousa {
  45% { transform: scale(1.3); }
}

/* The words */

.texto {
  grid-area: texto;
}

.ola {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  margin-top: 0.75rem;
  line-height: 0;
}

h1 img {
  width: min(100%, 30rem);
  height: auto;
}

.frase {
  margin-top: 1.75rem;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
}

.camada {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.05em 0.3em 0.1em;
  border-radius: 0.22em;
  background: var(--branco);
  color: var(--rosa);
}

.sobre {
  max-width: 30ch;
  margin-top: 1.5rem;
  color: var(--lilas);
  font-size: 1.125rem;
}

/* The page that was not found (404.html): the home's look, a title in place of
   the logo. Served at any address, so it asks for everything by absolute path. */

.marca-erro img {
  display: block;
  width: min(100%, 15rem);
  height: auto;
}

.titulo-erro {
  margin-top: 1.75rem;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
}

.botoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.botao {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--branco);
  border-radius: 999px;
  background: var(--branco);
  color: var(--roxo);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.botao svg {
  width: 1.4rem;
  height: 1.4rem;
}

.botao:hover {
  border-color: var(--verde);
  background: var(--verde);
  color: var(--tinta);
}

.botao.contorno {
  border-color: var(--lilas);
  background: transparent;
  color: var(--branco);
}

.botao.contorno:hover {
  border-color: var(--verde);
  background: var(--verde);
  color: var(--tinta);
}

:focus-visible {
  outline: 3px solid var(--verde);
  outline-offset: 4px;
}

footer {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--margem), 72rem);
  margin: 0 auto;
  padding-block: 1.5rem;
  color: var(--lilas);
  font-size: 0.875rem;
}

/* Phone: the symbol above, smaller and to the right, the words below. */
@media (max-width: 47.99rem) {
  main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "fio" "texto";
    align-items: start;
    gap: 1.5rem;
    padding-top: 2rem;
  }

  .fio {
    justify-self: end;
    width: min(62vw, 17rem);
  }

  .ola {
    font-size: 1.25rem;
  }
}
