/* ============================================================
   Aportize - Hub das calculadoras
   Carregar depois de chrome.css. Lista em linhas separadas por
   fio de cabelo, agrupadas por intenção. Sem card, sem caixa,
   sem sombra: a hierarquia vem do tipo e do espaço.
   Requer <main class="wrap calc-hub">.
   ============================================================ */

.calc-hub {
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: clamp(72px, 9vw, 120px);
  color: var(--text);
  font-family: var(--sans);
  color-scheme: dark;
}

/* ---------- Abertura ---------- */

.calc-hub__intro {
  margin: 0 0 clamp(44px, 6vw, 76px);
}

.calc-hub__intro .eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.calc-hub__intro h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.calc-hub__intro h1 span {
  color: var(--muted);
}

.calc-hub__lede {
  max-width: 52ch;
  margin: 24px 0 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* ---------- Grupo ---------- */

.calc-group {
  margin-top: clamp(40px, 5vw, 64px);
}
.calc-group:first-of-type {
  margin-top: 0;
}

.calc-group__label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ---------- Linhas ---------- */

.calc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.calc-list li {
  border-top: 1px solid var(--hairline);
}
.calc-list li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.calc-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name  arrow"
    "desc  arrow";
  align-items: center;
  gap: 4px 20px;
  padding: 20px 2px;
  color: inherit;
  text-decoration: none;
  transition: background-color var(--t);
}

.calc-list__name {
  grid-area: name;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  transition: color var(--t);
}

.calc-list__desc {
  grid-area: desc;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.calc-list__arrow {
  grid-area: arrow;
  align-self: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t), transform var(--t), color var(--t);
}

@media (hover: hover) {
  .calc-list a:hover .calc-list__name {
    color: var(--green);
  }
  .calc-list a:hover .calc-list__arrow {
    opacity: 1;
    color: var(--green);
    transform: translateX(0);
  }
}

.calc-list a:focus-visible .calc-list__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* No toque não existe hover, então a seta fica sempre visível. */
@media (hover: none) {
  .calc-list__arrow {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Fecho ---------- */

.calc-hub__footnote {
  max-width: 60ch;
  margin: clamp(44px, 6vw, 72px) 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.calc-hub__footnote a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t);
}

@media (hover: hover) {
  .calc-hub__footnote a:hover {
    color: var(--text);
  }
}

/* ---------- Tablet e desktop ---------- */

@media (min-width: 720px) {
  .calc-list a {
    grid-template-columns: minmax(0, 19rem) minmax(0, 1fr) auto;
    grid-template-areas: "name desc arrow";
    align-items: baseline;
    gap: 32px;
    padding: 22px 2px;
  }

  .calc-list__arrow {
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .calc-hub *,
  .calc-hub *::before,
  .calc-hub *::after {
    transition-duration: 1ms !important;
  }
}

@media (forced-colors: active) {
  .calc-list a:focus-visible {
    outline: 2px solid Highlight;
  }
}
