/* Layout: AK no topo; título à esquerda e arte dos pets à direita, apresentação do
   Projeto Karamelo centralizada logo abaixo; seções em coluna de até 1240px.
   Paleta tirada da própria arte dos pets. */
:root {
  --fundo: #F3E7DD;
  --fundo-alt: #F3E7DD;
  --realce: #FBF6EE;
  --marrom: #512D1B;
  --marrom-suave: #7A5340;
  --laranja: #FA580D;
  --laranja-hover: #E54C06;
  --laranja-texto: #B23F06;
  --amarelo: #FDBE06;
  --azul: #00A2F8;
  --verde: #118026;
  --tinta-amarela: #FFF1C4;
  --tinta-laranja: #FFE0CC;
  --tinta-azul: #D6EFFD;
  --linha: #E3D6C4;
  --branco: #FFFFFF;

  --fonte-titulo: "Fredoka", "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --fonte-texto: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --largura: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--marrom);
  font-family: var(--fonte-texto);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--laranja-texto); }
a:hover { color: var(--marrom); }

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

.pular {
  position: absolute; left: -9999px; top: 8px;
  background: var(--marrom); color: var(--fundo);
  padding: 10px 16px; border-radius: 999px; z-index: 50;
}
.pular:focus { left: 16px; }

.container {
  width: 100%;
  max-width: var(--largura);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3 {
  font-family: var(--fonte-titulo);
  font-weight: 600;
  color: var(--marrom);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: 24px; }
p { margin: 0; }

.sobretitulo {
  font-family: var(--fonte-texto);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--laranja-texto);
}

/* Botões */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--laranja);
  color: var(--branco);
  font-family: var(--fonte-titulo);
  font-weight: 600;
  font-size: 19px;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease;
}
.botao:hover { background: var(--laranja-hover); color: var(--branco); transform: translateY(-2px); }
.botao svg { width: 22px; height: 22px; flex: none; }

.botao-linha {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 800;
  color: var(--marrom);
  text-decoration: none;
  border-bottom: 2px solid var(--laranja);
  padding-bottom: 2px;
}
.botao-linha:hover { color: var(--laranja-texto); }
.botao-linha svg { width: 18px; height: 18px; transition: transform .18s ease; }
.botao-linha:hover svg { transform: translateX(3px); }

/* ---------- Cabeçalho ---------- */
.topo { position: relative; z-index: 20; padding-block: 16px; }
.topo .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.marca img { height: clamp(44px, 6vw, 60px); width: auto; }

.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.menu-toggle:hover { background: var(--realce); }
.menu-toggle span {
  display: block; width: 24px; height: 2.5px; border-radius: 2px; background: var(--marrom);
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.menu {
  position: absolute;
  right: var(--gutter);
  top: calc(100% - 4px);
  width: min(300px, calc(100vw - 32px));
  background: var(--branco);
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(81, 45, 27, .14);
}
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu a {
  display: block;
  padding: 12px 16px;
  border-radius: 14px;
  font-family: var(--fonte-titulo);
  font-weight: 500;
  font-size: 19px;
  color: var(--marrom);
  text-decoration: none;
}
.menu a:hover { background: var(--realce); }
.menu .menu-cta { background: var(--laranja); color: var(--branco); margin-top: 6px; }
.menu .menu-cta:hover { background: var(--laranja-hover); color: var(--branco); }

/* ---------- Arte dos pets ---------- */
.hero { padding-block: clamp(8px, 2vw, 24px) clamp(56px, 7vw, 96px); }
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}
.hero-texto { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 4.4vw, 66px); line-height: 1.12; }
.logo-inline { display: inline-block; height: 1.7em; width: auto; vertical-align: -0.55em; margin-inline: 0.02em; }
.projeto-texto { font-size: clamp(18px, 1.6vw, 22px); color: var(--marrom-suave); max-width: 40ch; }
.hero-arte img { width: 100%; height: auto; }
.projeto-acoes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; margin-top: 8px; }

/* ---------- Seções ---------- */
.secao { padding-block: clamp(64px, 9vw, 112px); }
.secao-alt { background: var(--fundo-alt); }
.secao { border-top: 1px solid var(--linha); }
.secao-cabeca { display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin-bottom: clamp(32px, 5vw, 52px); }
.secao-cabeca p { color: var(--marrom-suave); font-size: 18px; }

/* Como funciona: 2 passos ao lado do texto, 3 embaixo */
.passos {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(40px, 5vw, 72px);
  row-gap: clamp(36px, 4vw, 56px);
  align-items: start;
}
.passos-intro { display: flex; flex-direction: column; gap: 14px; align-self: start; padding-top: 8px; }
.passos-intro h2 { font-size: clamp(40px, 5vw, 64px); line-height: 1.02; }
.passos-intro p { font-size: clamp(18px, 1.8vw, 22px); color: var(--marrom-suave); }
.passo { position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.passo-texto { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.passo-num { height: clamp(52px, 5vw, 72px); width: auto; flex: none; }
.passo-texto p { font-family: var(--fonte-titulo); font-weight: 600; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.2; color: var(--marrom); }
.passo-img img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; }
.passo .seta {
  position: absolute; top: 55%;
  left: calc(clamp(40px, 5vw, 72px) / -2); transform: translate(-50%, -50%);
  width: clamp(22px, 2.4vw, 34px); height: auto;
}

/* Peças: três lado a lado */
.categorias { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.categoria {
  display: flex; flex-direction: column;
  overflow: hidden;
  min-width: 0;
  padding: 14px 14px 0;
  background: var(--amarelo);
  border-radius: 40px 28px 44px 30px / 32px 42px 28px 40px;
}
.categoria:nth-child(2) { background: var(--azul); border-radius: 30px 44px 28px 42px / 42px 28px 40px 30px; }
.categoria:nth-child(3) { background: var(--verde); border-radius: 44px 30px 40px 28px / 28px 40px 32px 44px; }
.categoria > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 50%; border-radius: 28px; }
.categoria-corpo { display: flex; flex-direction: column; gap: 10px; padding: 20px 12px 28px; flex-grow: 1; }
.titulo-3d { height: clamp(40px, 4.2vw, 54px); width: auto; max-width: 100%; margin-left: -4px; }
.categoria-frase { font-family: var(--fonte-titulo); font-weight: 600; font-size: 20px; line-height: 1.25; color: var(--marrom); text-wrap: balance; }
.categoria-corpo p:not(.categoria-frase) { color: var(--marrom); font-size: 16px; }
.categoria:nth-child(3) .categoria-frase, .categoria:nth-child(3) .categoria-corpo p:not(.categoria-frase) { color: #FFFFFF; }
.categoria .categoria-frase, .categoria .categoria-corpo p { color: #2B1309; }


/* Joguinho */
.jogo .container { display: flex; flex-direction: column; align-items: flex-start; }
.jogo-moldura {
  width: 100%; max-width: 900px; align-self: center;
  border: 4px solid var(--marrom); border-radius: 18px; overflow: hidden;
  background: var(--fundo); box-shadow: 6px 6px 0 var(--laranja);
}
#jogo { display: block; width: 100%; height: auto; image-rendering: pixelated; cursor: pointer; touch-action: manipulation; }
#jogo:focus-visible { outline: 3px solid var(--azul); outline-offset: -3px; }
.jogo-botao { align-self: center; margin-top: 24px; border: 0; cursor: pointer; }

/* Bastidores */
.redes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--linha); }
.rede {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 6px 20px;
  padding: 32px 32px 32px 0;
  align-items: start;
}
.rede + .rede { border-left: 2px solid var(--linha); padding-left: 32px; }
.rede-icone {
  grid-row: span 4;
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  color: var(--marrom);
}
.rede-icone svg { width: 28px; height: 28px; }
.rede:nth-child(1) .rede-icone { background: var(--amarelo); }
.rede:nth-child(2) .rede-icone { background: var(--azul); }
.rede h3 { font-size: 26px; }
.rede .arroba { font-weight: 800; color: var(--laranja-texto); }
.rede p { color: var(--marrom-suave); }
.rede .botao-linha { justify-self: start; margin-top: 10px; }

/* Convite final */
.convite { position: relative; text-align: center; overflow: hidden; }
.convite .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.convite h2 { font-size: clamp(34px, 5vw, 56px); max-width: 14ch; }
.convite p { max-width: 46ch; color: var(--marrom-suave); font-size: 18px; }
.convite .botao { margin-top: 8px; }
.forma { position: absolute; pointer-events: none; z-index: 0; height: auto; aspect-ratio: 1 / 1; }
.forma-laranja { width: clamp(140px, 18vw, 220px); left: -40px; top: 10%; color: var(--laranja); }
.forma-amarela-2 { width: clamp(110px, 14vw, 170px); right: -30px; bottom: 6%; color: var(--amarelo); }

/* Rodapé */
.rodape { padding-block: 40px 48px; border-top: 2px solid var(--linha); }
.rodape .container { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; align-items: center; }
.rodape-marca { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.rodape-marca img { height: 40px; width: auto; }
.rodape-marca p { color: var(--marrom-suave); font-size: 15px; }
.rodape-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.rodape-links a { font-weight: 800; color: var(--marrom); text-decoration: none; display: inline-block; padding-block: 10px; }
.rodape-links a:hover { color: var(--laranja-texto); }
.rodape-ak {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  font-size: 14px; color: var(--marrom-suave);
}
.rodape-ak .ak { display: flex; align-items: center; gap: 12px; }
.rodape-ak img { height: 36px; width: auto; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: minmax(0, 1fr); }
  .hero-texto { text-align: center; align-items: center; order: 2; }
  .hero-arte { order: 1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }

  .passos { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .passo .seta { display: none; }
  .passo-texto p { font-size: 19px; }
  .passo-num { height: 56px; }
  .passo-img { width: 100%; max-width: 320px; margin-inline: auto; }

  /* peças continuam lado a lado: deslize para ver */
  .categorias {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .categoria { scroll-snap-align: start; }

  .projeto-acoes { width: 100%; }
  .projeto-acoes .botao { width: 100%; }
  .redes { grid-template-columns: minmax(0, 1fr); }
  .rede { padding: 28px 0; }
  .rede + .rede { border-left: 0; padding-left: 0; border-top: 2px solid var(--linha); }
  .convite .botao { width: 100%; }
  .forma-laranja { width: 120px; left: -64px; top: -36px; }
  .forma-amarela-2 { width: 96px; right: -48px; bottom: -30px; }
  .rodape .container { grid-template-columns: minmax(0, 1fr); }
}
