/* The product's site: the identity's colors (Carvão, Violeta, Âmbar, Areia) and fonts (Fredoka for titles, Nunito
   for text), self-hosted. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --carvao: #0d0f26;
  --violeta: #7050de;
  --violeta-hover: #613fdb;
  --ambar: #ffc933;
  --areia: #f6e6d8;
  --text: #f5f4fb;
  --text-muted: #bfc1d6;
  --line: rgb(255 255 255 / 0.28);
  --line-strong: rgb(255 255 255 / 0.62);
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--carvao);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: grid;
  min-height: 100svh;
  max-width: 76rem;
  grid-template-rows: auto 1fr auto;
  margin-inline: auto;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
}

.wordmark {
  width: auto;
  height: 1.625rem;
}

.hero {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 6vh, 4rem);
}

.badge {
  display: inline-block;
  margin: 0;
  padding: 0.3125rem 0.875rem;
  border-radius: 999px;
  background: var(--ambar);
  color: var(--carvao);
  font-size: 0.875rem;
  font-weight: 800;
}

h1 {
  margin: 1.25rem 0 1rem;
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  font-weight: 600;
  line-height: 1.06;
  text-wrap: balance;
}

.lead {
  max-width: 34rem;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}

.primary {
  background: var(--violeta);
}

.primary:hover {
  background: var(--violeta-hover);
}

.secondary {
  border-color: var(--line);
}

.secondary:hover {
  border-color: var(--line-strong);
  background: rgb(255 255 255 / 0.06);
}

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

/* The drawing table: the welcome flow's workshop on the identity's sand */
.site {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--areia);
  color: #37384f;

  &::before {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgb(85 86 109 / 0.3) 0.8px, transparent 1px);
    background-size: 1rem 1rem;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    content: "";
  }

  & > svg {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    padding: clamp(0.75rem, 3vw, 2rem);
  }

  & .paper {
    color: #6b49d7;
  }

  & .survey {
    color: #37384f;
  }

  & .blueprint {
    color: #7b5cf6;
    opacity: 0.8;
  }
}

.foot {
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

/* The app's hammer gesture (frontend/src/styles/welcome-workshop.css): two strikes, then a rest. Cell two of the
   sprite is the raised mallet, cell three the resting grip and cell four the strike. */
@media (prefers-reduced-motion: no-preference) {
  .builder image {
    animation: hammer 3.2s steps(1, end) 0.6s infinite;
  }
}

@keyframes hammer {
  0%,
  15.75%,
  17.5%,
  33.25% {
    transform: translateX(100px);
  }
  5.25%,
  13.1%,
  22.75%,
  30.6%,
  35%,
  100% {
    transform: translateX(0);
  }
  8.4%,
  25.9% {
    transform: translateX(-100px);
  }
}
