/* Página-índice, na raiz do site (/): a pergunta e as seis opções, cada uma com a
   miniatura do seu desenho. Chão em névoa, miniaturas brancas, verde petróleo
   e o amarelo só no ponto do fio. Títulos em Obvia Wide, texto em Atkinson.
   Sem JavaScript: a entrada é CSS, a troca de página é a transição de
   documento do navegador (@view-transition, em comum.css), e tudo isso some
   com prefers-reduced-motion. */
body.indice {
  padding-bottom: 0;
  background: var(--mist);
  color: var(--ink);
}

.ind-topo {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gut));
  margin-inline: auto;
  padding: 20px var(--gut) 0;
}
.ind-marca {
  gap: 12px;
  font-size: 1.5rem;
}
.ind-marca img {
  width: 48px;
  height: 48px;
}

.ind-main {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gut));
  margin-inline: auto;
  padding: 0 var(--gut) clamp(64px, 8vw, 104px);
}

.ind-abertura {
  padding: clamp(36px, 7vw, 96px) 0 clamp(36px, 5vw, 64px);
}
/* A piada acima do título: uma frase inteira, não um rótulo */
.ind-desculpe {
  max-width: 40rem;
  margin-bottom: clamp(20px, 3vw, 40px);
}
.ind-desculpe strong {
  display: block;
  color: var(--b3);
  font-family: var(--sign);
  font-size: clamp(1.1875rem, 1rem + 0.9vw, 1.625rem);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}
.ind-desculpe span {
  display: block;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: var(--t-lead);
  line-height: 1.45;
  text-wrap: pretty;
}
.ind-titulo {
  max-width: 17ch;
  font-family: var(--sign);
  font-size: clamp(2.25rem, 1.1rem + 4.6vw, 4.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
/* cada palavra sobe de uma máscara; o respiro de baixo é para a haste do "q" */
.pal {
  display: inline-block;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  overflow: hidden;
  vertical-align: top;
}
.pal > span {
  display: inline-block;
}
.ind-fio {
  width: clamp(220px, 34vw, 340px);
  margin-top: clamp(18px, 2vw, 28px);
  overflow: visible;
}
.ind-fio path {
  fill: none;
  stroke: var(--b3);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
}
.ind-fio circle {
  fill: var(--signal);
  stroke: var(--ink);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
}

/* As seis opções */
.ind-lista {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.4vw, 48px) clamp(16px, 2.4vw, 32px);
}
.ind-card {
  display: block;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ind-card:focus-visible {
  outline: 3px solid var(--b3);
  outline-offset: 6px;
  border-radius: 18px;
}
.ind-prancha {
  display: block;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--sombra-1);
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    border-color 0.3s var(--ease);
}
.mini {
  width: 100%;
  height: auto;
}
.ind-nome {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.ind-nome b {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--sign);
  font-size: 0.9375rem;
  font-weight: 400;
  transition: background-color 0.3s var(--ease);
}
.ind-nome strong {
  font-family: var(--sign);
  font-size: var(--t-h3);
  font-weight: 400;
  line-height: 1.2;
}
.ind-nome .icone {
  margin-left: auto;
  color: var(--b3);
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.4s var(--ease);
}
.ind-frase {
  display: block;
  margin-top: 6px;
  padding-left: 42px;
  color: var(--ink-2);
  font-size: var(--t-body);
  line-height: 1.45;
  text-wrap: pretty;
}
.ind-fecho {
  max-width: 60ch;
  margin-top: clamp(40px, 6vw, 72px);
  color: var(--ink-2);
  font-size: var(--t-small);
}

/* Estado: o cartão sob o mouse (ou com o foco) sobe, a seta aparece e o
   desenho da opção se mexe um pouco, mostrando a ideia dela. */
.ind-card:hover .ind-prancha,
.ind-card:focus-visible .ind-prancha {
  border-color: var(--b3);
  box-shadow: var(--sombra-2);
  transform: translateY(-6px);
}
.ind-card:hover .ind-nome b,
.ind-card:focus-visible .ind-nome b {
  background: var(--b3);
}
.ind-card:hover .ind-nome .icone,
.ind-card:focus-visible .ind-nome .icone {
  opacity: 1;
  transform: none;
}
.ind-card:active .ind-prancha {
  transform: translateY(-2px) scale(0.99);
}
@media (hover: none) {
  .ind-nome .icone {
    opacity: 1;
    transform: none;
  }
}

/* Miniaturas: cores e traços (o desenho está em indice.mjs) */
.m-f,
.m-b {
  fill: #ffffff;
}
.m-n,
.m-b-soft {
  fill: var(--mist);
}
.m-t {
  fill: var(--ink);
}
.m-p {
  fill: var(--b3);
}
.m-d {
  fill: var(--b3-deep);
}
.m-s {
  fill: var(--signal);
}
.m-r {
  fill: var(--rule);
}
.m-r2 {
  fill: #c3d0cb;
}
.m-bm {
  fill: #ffffff80;
}
.m-tela {
  fill: #edf2f0;
}
.m-pill {
  fill: var(--b3-soft);
}
.m-no {
  fill: #ffffff;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.m-bd {
  stroke: var(--rule);
  stroke-width: 1;
}
.m-vz {
  fill: none;
  stroke: var(--b3);
  stroke-width: 1.5;
}
.m-vzb {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.5;
}
.m-fio {
  fill: none;
  stroke: var(--b3);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.m-pt {
  stroke: var(--ink);
  stroke-width: 1;
}
.m-mexe {
  transform-box: fill-box;
  transition: transform 0.6s var(--ease);
}
.m-frente {
  transform-origin: right center;
}
@media (hover: hover) {
  .ind-card:hover .m-grade,
  .ind-card:focus-visible .m-grade {
    transform: translate(-3px, -3px);
  }
  .ind-card:hover .m-frente,
  .ind-card:focus-visible .m-frente {
    transform: scaleX(1.12);
  }
  .ind-card:hover .m-marca,
  .ind-card:focus-visible .m-marca {
    transform: translateY(24px);
  }
  .ind-card:hover .m-laptop,
  .ind-card:focus-visible .m-laptop {
    transform: translateX(-6px);
  }
  .ind-card:hover .m-fone,
  .ind-card:focus-visible .m-fone {
    transform: translateX(7px);
  }
  .ind-card:hover .m-faixa,
  .ind-card:focus-visible .m-faixa {
    transform: translateX(-16px);
  }
}

/* Entrada: o título sobe palavra por palavra, o fio se desenha até o ponto
   amarelo e as opções chegam em fila. O estado de partida de cada animação é o
   que já está na tela, então sem animação nada fica escondido. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ind-sobe {
    from {
      transform: translateY(105%);
    }
  }
  @keyframes ind-desenha {
    from {
      stroke-dashoffset: 1;
    }
  }
  @keyframes ind-ponto {
    from {
      transform: scale(0);
    }
  }
  @keyframes ind-aparece {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
  @keyframes ind-chega {
    from {
      opacity: 0;
      transform: translateY(34px) scale(0.97);
    }
  }
  @keyframes ind-fluxo {
    to {
      stroke-dashoffset: -18;
    }
  }
  .ind-topo {
    animation: ind-aparece 0.7s var(--ease) both;
  }
  .ind-desculpe {
    animation: ind-aparece 0.8s 0.1s var(--ease) both;
  }
  .pal > span {
    animation: ind-sobe 0.9s 0.25s var(--ease) both;
  }
  .pal:nth-child(2) > span {
    animation-delay: 0.32s;
  }
  .pal:nth-child(3) > span {
    animation-delay: 0.39s;
  }
  .pal:nth-child(4) > span {
    animation-delay: 0.46s;
  }
  .pal:nth-child(5) > span {
    animation-delay: 0.53s;
  }
  .pal:nth-child(6) > span {
    animation-delay: 0.6s;
  }
  .ind-fio path {
    animation: ind-desenha 1s 0.8s var(--ease) both;
  }
  .ind-fio circle {
    animation: ind-ponto 0.5s 1.65s var(--ease) both;
  }
  .ind-lista > li {
    animation: ind-chega 1s 1s var(--ease) both;
  }
  .ind-lista > li:nth-child(2) {
    animation-delay: 1.1s;
  }
  .ind-lista > li:nth-child(3) {
    animation-delay: 1.2s;
  }
  .ind-lista > li:nth-child(4) {
    animation-delay: 1.3s;
  }
  .ind-lista > li:nth-child(5) {
    animation-delay: 1.4s;
  }
  .ind-lista > li:nth-child(6) {
    animation-delay: 1.5s;
  }
  .ind-fecho {
    animation: ind-aparece 0.9s 1.7s var(--ease) both;
  }
  @media (hover: hover) {
    .ind-card:hover .m-fluxo,
    .ind-card:focus-visible .m-fluxo {
      stroke-dasharray: 5 4;
      animation: ind-fluxo 0.9s linear infinite;
    }
  }
}

@media (max-width: 960px) {
  .ind-lista {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .ind-lista {
    grid-template-columns: minmax(0, 1fr);
  }
  /* o alternador não existe aqui, mas o respiro do pé da página fica */
  .ind-main {
    padding-bottom: 56px;
  }
}

/* Traços próprios de algumas miniaturas: pontilhado do sumário, marcas de corte
   da capa, o petróleo mais fundo da segunda frente e o marfim do Clássico. */
.m-pont {
  fill: none;
  stroke: #9fb1ab;
  stroke-width: 1;
  stroke-dasharray: 0.6 2.6;
  stroke-linecap: round;
}
.m-corte {
  fill: none;
  stroke: #9fb1ab;
  stroke-width: 0.8;
}
.m-d2 {
  fill: #003a3f;
}
.m-marfim {
  fill: #f8f4ea;
}
