/* ==========================================================================
   Cãovívio Pet Shop — "Para breve"
   As medidas usam clamp()/vh para a página caber sempre no ecrã, sem scroll,
   do telemóvel pequeno (360×640) ao PC grande.
   ========================================================================== */


/* 1. Cores e base
   -------------------------------------------------------------------------- */

:root {
  --vermelho: #d40f1e;
  --vermelho-escuro: #a80a17;
  --papel: #fff8ec;
  --tinta: #16181d;
  --texto-suave: #4a4d55;
  --fio: #3b2a1e;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--vermelho);
  color: #fff;
  font-family: "Hind", system-ui, sans-serif;
}

a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.icones {
  position: absolute;
  width: 0;
  height: 0;
}


/* 2. Topo
   -------------------------------------------------------------------------- */

.topo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(10px, 2.4vh, 22px) clamp(16px, 4vw, 40px);
}

.marca {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
}

.marca__mascote {
  width: clamp(40px, min(7vw, 7.5vh), 80px);
  height: auto;
  filter: drop-shadow(0 3px 4px rgba(60, 0, 6, .35));
}

/* Letras brancas com contorno preto, como o traço da mascote. */
.marca__logotipo {
  width: clamp(130px, min(19vw, 22vh), 230px);
  height: auto;
  filter:
    drop-shadow(1.5px 0 0 #000)
    drop-shadow(-1.5px 0 0 #000)
    drop-shadow(0 1.5px 0 #000)
    drop-shadow(0 -1.5px 0 #000);
}

.topo__instagram {
  padding-bottom: 1px;
  border-bottom: 2px solid rgba(255, 255, 255, .4);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.topo__instagram:hover,
.topo__instagram:focus-visible {
  border-color: #fff;
}


/* 3. Conteúdo e letreiro pendurado
   -------------------------------------------------------------------------- */

.conteudo {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px clamp(8px, 2vh, 24px);
}

.prego {
  position: relative;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f3f3f3, #8c8c8c 70%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
}

.letreiro {
  --meia-largura: clamp(90px, 23vw, 170px); /* distância do centro a cada furo */
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -7px;
  transform-origin: 50% 0;
  animation: balancar 5.5s ease-in-out infinite;
}

@keyframes balancar {
  0%, 100% { transform: rotate(2.2deg); }
  50%      { transform: rotate(-2.2deg); }
}

/* O fio passa por cima do cartão e acaba no centro dos furos. */
.letreiro__fio {
  position: relative;
  z-index: 2;
  display: block;
  width: calc(var(--meia-largura) * 2 + 12px);
  height: clamp(30px, 6.5vh, 76px);
  margin-bottom: -22px;
}

.letreiro__fio path {
  fill: none;
  stroke: var(--fio);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.letreiro__cartao {
  position: relative;
  width: min(560px, 88vw);
  padding: clamp(30px, 4.6vh, 48px) clamp(20px, 5vw, 48px) clamp(16px, 3.4vh, 36px);
  border-radius: 18px;
  background: var(--papel);
  color: var(--tinta);
  text-align: center;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, .05),
    0 24px 40px -14px rgba(60, 0, 6, .55);
}

/* Furos onde o fio prende. */
.letreiro__cartao::before,
.letreiro__cartao::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vermelho-escuro);
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, .4);
}

.letreiro__cartao::before { left: calc(50% - var(--meia-largura) - 6px); }
.letreiro__cartao::after  { left: calc(50% + var(--meia-largura) - 6px); }

.letreiro__etiqueta {
  color: var(--vermelho);
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 600;
}

.letreiro__titulo {
  margin-top: 8px;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: clamp(40px, min(12vw, 10.5vh), 104px);
  font-stretch: 112%;
  font-weight: 900;
  line-height: .86;
  letter-spacing: -0.035em;
}

.letreiro__texto {
  max-width: 32ch;
  margin: clamp(8px, 1.8vh, 18px) auto 0;
  color: var(--texto-suave);
  font-size: clamp(15px, min(2.3vw, 2.3vh), 19px);
  line-height: 1.5;
}

.letreiro__animais {
  margin-top: clamp(10px, 2.2vh, 22px);
  padding-top: clamp(8px, 1.8vh, 18px);
  border-top: 2px dashed #e7dccb;
  color: var(--texto-suave);
  font-size: clamp(13.5px, 1.8vh, 15px);
  line-height: 1.45;
}

.letreiro__animais strong {
  color: var(--tinta);
}


/* 4. Lojas
   -------------------------------------------------------------------------- */

.lojas {
  max-width: 1040px;
  margin-top: clamp(14px, 4.5vh, 56px);
  text-align: center;
}

.lojas__titulo {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: clamp(17px, min(3vw, 2.8vh), 24px);
  font-weight: 800;
}

.lojas__lista {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(8px, 1.6vh, 14px);
  padding: 0;
  list-style: none;
}

.lojas__lista a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 132px;
  padding: clamp(6px, 1.1vh, 10px) 14px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  color: #fff;
  line-height: 1.2;
  text-decoration: none;
}

.lojas__lista a:hover,
.lojas__lista a:focus-visible {
  border-color: #fff;
  background: #fff;
  color: var(--vermelho);
}

.lojas__lista strong {
  font-size: 16px;
  font-weight: 600;
}

.lojas__lista span {
  font-size: 13px;
  opacity: .85;
}

.lojas__lista svg {
  display: none;
  width: 15px;
  height: 15px;
}


/* 5. Rodapé
   -------------------------------------------------------------------------- */

.rodape {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(4px, 1vh, 10px) 24px;
  padding: clamp(8px, 1.8vh, 18px) 16px clamp(10px, 2vh, 20px);
  font-size: 15px;
}

.rodape a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.rodape a:hover,
.rodape a:focus-visible {
  text-decoration: underline;
}

.rodape svg {
  width: 18px;
  height: 18px;
}


/* Assinatura Kanoy (K + nome), numa linha própria por baixo das redes sociais, discreta. */
.rodape .assinatura {
  flex-basis: 100%;
  justify-content: center;
  gap: 4px;
  font-family: "Baloo 2", "Archivo", system-ui, sans-serif;
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  opacity: .8;
  transition: opacity .2s ease;
}

.rodape .assinatura span {
  padding-top: 2px; /* a Baloo 2 assenta um pouco alta */
}

/* K em branco (mantém a forma do balão), a flutuar devagar. */
.rodape .assinatura img {
  display: block;
  width: clamp(11px, 1.1vw, 14px);
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 2px 2px rgba(60, 0, 6, .3));
  animation: flutuar 5s ease-in-out infinite;
}

@keyframes flutuar {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-3px) rotate(2deg); }
}

.rodape .assinatura:hover,
.rodape .assinatura:focus-visible {
  opacity: 1;
  text-decoration: none;
}


/* 6. Rasto de patas (posições calculadas em js/patas.js)
   -------------------------------------------------------------------------- */

.rasto {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* Cada pegada: aparece, fica e desvanece (duração e atraso definidos em js/patas.js). */
.pata {
  position: absolute;
  width: clamp(22px, 2.6vw, 34px);
  height: clamp(22px, 2.6vw, 34px);
  color: var(--vermelho-escuro);
  opacity: 0;
  animation-name: pegada;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}

@keyframes pegada {
  0%   { opacity: 0;  transform: var(--rotacao) scale(.6); }
  18%  { opacity: .9; transform: var(--rotacao) scale(1); }
  65%  { opacity: .9; transform: var(--rotacao) scale(1); }
  100% { opacity: 0;  transform: var(--rotacao) scale(1); }
}


/* 7. Telemóvel
   -------------------------------------------------------------------------- */

/* O logótipo precisa do espaço; o Instagram continua no rodapé. */
@media (max-width: 480px) {
  .topo { justify-content: center; }
  .topo__instagram { display: none; }
}

/* Lojas só com a cidade e o pin do mapa (tocar abre o Google Maps), para caber sem scroll. */
@media (max-width: 600px) {
  .lojas__lista { gap: 8px; }

  .lojas__lista a {
    flex-direction: row;
    gap: 6px;
    min-width: 0;
    padding: 8px 14px;
  }

  .lojas__lista span { display: none; }
  .lojas__lista svg  { display: block; }
}


/* 8. Quem prefere menos movimento (definição do sistema)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .letreiro { animation: none; }
  .pata     { animation: none; opacity: .9; }
  .assinatura img { animation: none; }
}
