/* ===== Fontes (hospedadas aqui: nenhum dado do visitante vai pro Google) ===== */
/* subconjunto latin do Google Fonts — cobre todo o português */
@font-face {
  font-family: "Syne";
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/syne-800.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-500.woff2") format("woff2");
}

/* Inter é variável: um arquivo atende 400 e 500 */
@font-face {
  font-family: "Inter";
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/inter-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2");
}

/* ===== Tokens ===== */
:root {
  --bg: #0B0B0C;
  --ink: #F2EEE6;
  --muted: #8A877F;
  --line: rgba(242, 238, 230, .12);
  --accent: #C8A96A; /* acento único: usar pouco (< 5% da tela) */
  --live: #4ADE80;   /* só o ponto de "aceitando projetos" */

  --font-display: "Syne", "Arial Black", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* clip (e não hidden): hidden cria um contêiner de rolagem e quebra o sticky do hero */
  overflow-x: clip;
}

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

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ===== Cabeçalho ===== */
/* mobile: logo + status na 1ª linha, menu na 2ª */
.header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px 16px;
  padding: 20px var(--gutter) 0;
}

.header__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .08em;
}

.header__nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.header__nav a,
.header__status {
  font-family: var(--font-mono);
  font-size: .6875rem; /* 11px */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* em telas bem estreitas o ano sai pra caber logo + status na mesma linha */
.header__year {
  display: none;
}

@media (min-width: 400px) {
  .header__year {
    display: inline;
  }
}

.header__nav a {
  color: var(--muted);
  transition: color .2s;
}

.header__nav a:hover {
  color: var(--ink);
}

.header__status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  white-space: nowrap;
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 76px);
  overflow: hidden;
}

/* mobile: órbita atrás do título, discreta */
.hero__orbit {
  position: absolute;
  z-index: 0;
  top: 2%;
  left: 50%;
  width: 150vw;
  max-width: 900px;
  translate: -50% 0;
  opacity: .45;
  pointer-events: none;
}

.orbit {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.orbit__spin {
  transform-box: view-box;
  transform-origin: 50% 50%;
}

.orbit__planet {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.orbit__ring {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: .55;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.orbit__ring--mid {
  stroke-opacity: .3;
}

.orbit__ring--faint {
  stroke-opacity: .16;
}

.orbit__chip {
  fill: var(--ink);
}

.orbit__chip--dim {
  fill: var(--muted);
}

.orbit__chip--accent {
  fill: var(--accent);
}

.hero__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 32px;
  padding: 96px var(--gutter) 48px;
}

.hero__title {
  max-width: 13ch;
  font-family: var(--font-display);
  font-weight: 800;
  /* Syne é muito larga: 8.6vw é o que cabe "Construímos" numa linha em 360px */
  font-size: clamp(1.9rem, 8.6vw, 7.25rem);
  line-height: .95;
  letter-spacing: -.035em;
}

/* a serifa itálica tem olho menor que a Syne: sobe um pouco pra alinhar visualmente */
.hero__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: -.01em;
  line-height: 0;
}

.hero__bottom {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__lead {
  max-width: 34ch;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 78%, var(--bg));
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Botões (pílula) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 500;
  transition: background-color .25s, color .25s, border-color .25s, transform .15s;
}

.btn:active {
  transform: scale(.98);
}

.btn--solid {
  background: var(--ink);
  color: var(--bg);
}

.btn--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--outline {
  border-color: rgba(242, 238, 230, .35);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--ink);
}

/* ===== Faixa de palavras ===== */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.marquee__track {
  display: flex;
  width: max-content;
}

.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee__group span,
.marquee__group i {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: -.01em;
  color: var(--muted);
}

.marquee__group i {
  padding: 0 .9em;
  color: var(--line);
}

/* ===== Folha clara (cores invertidas) ===== */
.sheet {
  --sheet-muted: #5E5B54; /* o muted do escuro não tem contraste suficiente no creme */
  --sheet-line: rgba(11, 11, 12, .14);

  position: relative;
  z-index: 2;
  padding: 72px var(--gutter) 96px;
  /* cantos de baixo também: a folha "devolve" o escuro no Contato */
  border-radius: 24px;
  background: var(--ink);
  color: var(--bg);
}

.block + .block {
  margin-top: 96px;
}

.block__label {
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--sheet-muted);
}

/* --- Sobre --- */
.about__text {
  max-width: 30ch;
  font-size: clamp(1.5rem, 3.4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.about__sign {
  margin-top: 32px;
  font-size: .9375rem;
  color: var(--sheet-muted);
}

/* --- Produtos --- */
.products {
  list-style: none;
  border-top: 1px solid var(--sheet-line);
}

.product {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--sheet-line);
}

.product__name {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 5.2vw, 4.25rem);
  line-height: 1;
  letter-spacing: -.035em;
  transition: transform .4s var(--ease-out);
}

.product__desc {
  grid-column: 1 / -1;
  max-width: 40ch;
  font-size: .9375rem;
  color: var(--sheet-muted);
}

.product__type {
  align-self: center;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--sheet-muted);
}

/* ação = pílula de contorno (espelho do .btn--outline no creme) */
.product__action {
  justify-self: end;
  padding: 10px 22px;
  border: 1px solid rgba(11, 11, 12, .35);
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s;
}

/* última linha é o convite: a pílula fica cheia */
.product--cta .product__action {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

@media (hover: hover) {
  a.product:hover .product__name {
    transform: translateX(12px);
  }

  a.product:hover .product__action {
    border-color: var(--bg);
  }

  .product--cta:hover .product__action {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
  }
}

/* --- Processo --- */
.steps {
  list-style: none;
  border-top: 1px solid var(--sheet-line);
}

/* mobile: número em cima, nome com a largura toda ("Acompanhamento" é longo na Syne) */
.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 28px 0;
  border-bottom: 1px solid var(--sheet-line);
}

.step__num {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  color: var(--sheet-muted);
}

.step__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 6.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.step__desc {
  max-width: 36ch;
  font-size: .9375rem;
  color: var(--sheet-muted);
}

/* ===== Contato (volta pro escuro) ===== */
/* fundo e camada próprios: o hero sticky continua "atrás" até o fim do <main> */
.contact {
  position: relative;
  z-index: 1;
  /* começa 40px por trás da folha: os cantos arredondados mostram este fundo, não o hero */
  margin-top: -40px;
  padding: 160px var(--gutter) 96px;
  background: var(--bg);
}

.contact__title {
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 7.4vw, 6.5rem);
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.contact__lead {
  max-width: 34ch;
  margin: 28px 0 36px;
  font-size: 1.0625rem;
  color: color-mix(in srgb, var(--ink) 78%, var(--bg));
}

.btn--lg {
  min-height: 60px;
  padding: 0 36px;
  font-size: 1rem;
}

.contact__alt {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.contact__alt li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact__label {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}

.contact__alt a {
  font-size: 1.0625rem;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color .2s;
}

.contact__alt a:hover {
  text-decoration-color: var(--ink);
}

/* ===== Rodapé ===== */
.footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--line);
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .08em;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer__nav a,
.footer__copy {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}

.footer__nav a:hover {
  color: var(--ink);
}

/* ===== WhatsApp flutuante (só celular) ===== */
.wa-float {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid rgba(242, 238, 230, .2);
  font-size: .9375rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(11, 11, 12, .25);
  /* escondido por padrão; o script põe .is-visible */
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s var(--ease-out), visibility 0s .3s;
}

.wa-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .3s, transform .3s var(--ease-out), visibility 0s;
}

/* ===== Movimento (só pra quem não pediu menos movimento) ===== */
@media (prefers-reduced-motion: no-preference) {
  /* hero fica parado e a folha sobe por cima; --hero-top vem do script
     (negativo quando o hero é mais alto que a tela, pra não esconder os botões) */
  .hero {
    position: sticky;
    top: var(--hero-top, 0px);
    z-index: 0;
  }

  .orbit__spin {
    animation: spin 160s linear infinite;
  }

  .marquee__track {
    animation: marquee 40s linear infinite;
  }

  .status-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--live);
    animation: ping 2.4s var(--ease-out) infinite;
  }

  /* entrada: uma sequência só, no carregamento */
  .hero__title,
  .hero__bottom {
    animation: rise 1.1s var(--ease-out) both;
  }

  .hero__bottom {
    animation-delay: .25s;
  }

  .hero__orbit {
    animation: fade-in 2s ease-out .15s both;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* track tem 2 metades iguais: andar 50% emenda o loop */
@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes ping {
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* ===== Tablet ===== */
@media (min-width: 720px) {
  .header {
    padding-top: 28px;
  }

  .header__logo {
    font-size: 1.15rem;
  }

  .hero__bottom {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
  }

  .hero__orbit {
    width: 110vw;
  }

  /* do tablet pra cima o cabeçalho e o Contato bastam */
  .wa-float {
    display: none;
  }

  .footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ===== Desktop: logo | menu | status numa linha, órbita à direita ===== */
@media (min-width: 1024px) {
  .header {
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
  }

  .header__nav {
    grid-column: 2;
    grid-row: 1;
    gap: 40px;
    padding-top: 0;
    border-top: 0;
  }

  .header__status {
    justify-self: end;
  }

  .hero {
    min-height: calc(100svh - 64px);
  }

  .hero__orbit {
    top: 50%;
    left: auto;
    right: -14vw;
    width: min(74vw, 1080px);
    max-width: none;
    translate: 0 -56%;
    opacity: 1;
  }

  .hero__content {
    padding-top: 72px;
    padding-bottom: 48px;
  }

  .hero__title {
    max-width: 11ch;
  }

  .header__nav a,
  .header__status {
    letter-spacing: .16em;
  }

  .sheet {
    padding-top: 120px;
    padding-bottom: 160px;
    border-radius: 40px;
  }

  /* Processo: número | nome | descrição numa linha */
  .step {
    grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 26rem);
    align-items: baseline;
    gap: 32px;
    padding: 36px 0;
  }

  .step__desc {
    grid-column: 3;
  }

  .contact {
    padding-top: 240px;
    padding-bottom: 140px;
  }

  .block + .block {
    margin-top: 160px;
  }

  /* Sobre: rótulo numa coluna estreita, texto ao lado */
  #sobre {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 32px;
  }

  #sobre .block__label {
    margin: 0;
    padding-top: .9em;
  }

  /* nome sozinho na 1ª linha (a Syne não cabe em coluna); descrição · tipo · ação embaixo */
  .product {
    grid-template-columns: minmax(0, 1fr) 12rem 9rem;
    align-items: center;
    gap: 20px 32px;
    padding: 44px 0 36px;
  }

  .product__desc {
    grid-column: auto;
  }

  .product__action {
    grid-column: 3;
  }
}
