/* Visual no estilo Apple (Human Interface Guidelines): fonte do sistema (SF Pro no iPhone e no Mac),
   cinzas neutros, índigo do sistema nas ações (cor do Rota Kerma), cartões sem moldura, botões em cápsula e alvos de toque de 44 px.
   Carregado por último: só redefine tokens e acabamento; nenhuma tela muda de estrutura.
   O dourado continua só na marca (logo e contagem regressiva). */
:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #6e6e73;
  --line: #e5e5ea;
  --line-strong: #d2d2d7;
  --paper: #f5f5f7;
  --surface: #fff;
  --surface-2: #fbfbfd;
  --soft: #f2f2f7;
  --soft-2: #e8e8ed;
  --navy: #1d1d1f;
  --navy-2: #2c2c2e;
  --navy-3: #3a3a3c;
  --navy-line: #48484a;
  --on-navy: #f5f5f7;
  --on-navy-muted: #a1a1a6;
  --btn: #5856d6;
  --on-btn: #fff;
  --green: #4f4cc9;
  --green-2: #5856d6;
  --green-line: #bcbaf2;
  --accent-soft: rgba(88, 86, 214, 0.1);
  --focus-ring: rgba(88, 86, 214, 0.32);
  --ok: #1d7a3a;
  --ok-fill: #28a745;
  --ok-soft: #e6f6ea;
  --bad: #c4281c;
  --bad-fill: #ff3b30;
  --bad-soft: #fdeceb;
  --lhero: #000;
  --lhero-2: #1d1d1f;
  --heat-0: #ebebf0;
  --heat-1: #d3d2f6;
  --heat-2: #a9a7ee;
  --heat-3: #7c79e3;
  --heat-4: #4f4cc9;
  --sidebar: #f5f5f7;
  --sidebar-sel: #e3e3e8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 18px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.06), 0 24px 64px rgba(0, 0, 0, 0.14);
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --pill: 980px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #98989d;
    --line: #2c2c2e;
    --line-strong: #3a3a3c;
    --paper: #000;
    --surface: #1c1c1e;
    --surface-2: #232325;
    --soft: #2c2c2e;
    --soft-2: #3a3a3c;
    --navy: #1c1c1e;
    --navy-2: #2c2c2e;
    --navy-3: #3a3a3c;
    --navy-line: #48484a;
    --btn: #5e5ce6;
    --on-btn: #fff;
    --green: #8e8cff;
    --green-2: #5e5ce6;
    --green-line: #3d3b8f;
    --accent-soft: rgba(94, 92, 230, 0.22);
    --focus-ring: rgba(94, 92, 230, 0.5);
    --ok: #30d158;
    --ok-fill: #248a3d;
    --ok-soft: #12301c;
    --bad: #ff6961;
    --bad-fill: #d70015;
    --bad-soft: #3a1513;
    --lhero: #000;
    --lhero-2: #161617;
    --heat-0: #1c1c1e;
    --heat-1: #25244f;
    --heat-2: #3a3889;
    --heat-3: #5e5ce6;
    --heat-4: #a5a3ff;
    --sidebar: #161617;
    --sidebar-sel: #2c2c2e;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 64px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme='dark'] {
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #98989d;
  --line: #2c2c2e;
  --line-strong: #3a3a3c;
  --paper: #000;
  --surface: #1c1c1e;
  --surface-2: #232325;
  --soft: #2c2c2e;
  --soft-2: #3a3a3c;
  --navy: #1c1c1e;
  --navy-2: #2c2c2e;
  --navy-3: #3a3a3c;
  --navy-line: #48484a;
  --btn: #5e5ce6;
  --on-btn: #fff;
  --green: #8e8cff;
  --green-2: #5e5ce6;
  --green-line: #3d3b8f;
  --accent-soft: rgba(94, 92, 230, 0.22);
  --focus-ring: rgba(94, 92, 230, 0.5);
  --ok: #30d158;
  --ok-fill: #248a3d;
  --ok-soft: #12301c;
  --bad: #ff6961;
  --bad-fill: #d70015;
  --bad-soft: #3a1513;
  --lhero: #000;
  --lhero-2: #161617;
  --heat-0: #1c1c1e;
  --heat-1: #25244f;
  --heat-2: #3a3889;
  --heat-3: #5e5ce6;
  --heat-4: #a5a3ff;
  --sidebar: #161617;
  --sidebar-sel: #2c2c2e;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* Tipografia: SF Pro, títulos grandes e justos, texto de 15–17 px. */
body {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
}
h1 {
  letter-spacing: -0.028em;
  line-height: 1.1;
}
h2 {
  letter-spacing: -0.02em;
}
/* Os rótulos em caixa alta e fonte mono viram a etiqueta discreta da Apple: semibold, sem caixa alta. */
.label,
.grouphead {
  font-family: var(--body);
  text-transform: none;
  letter-spacing: -0.005em;
  font-size: 13px;
  font-weight: 600;
}
.badge,
.tag {
  font-family: var(--body);
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 600;
  border: 0;
  border-radius: var(--pill);
  padding: 5px 12px;
  background: var(--accent-soft);
  color: var(--green);
}

/* Barra lateral como a do Mac: fundo claro, item escolhido em cinza, ícones em azul. */
aside {
  background: var(--sidebar);
  color: var(--ink);
  border-right: 1px solid var(--line);
}
aside .brand,
.brand {
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.04em;
}
aside .eyebrow {
  color: var(--muted);
  letter-spacing: 0.02em;
  font-weight: 600;
}
nav {
  gap: 2px;
}
nav a {
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s var(--ease);
}
nav a .navicon {
  color: var(--green);
}
nav a:hover {
  background: var(--soft-2);
}
nav a.active {
  background: var(--sidebar-sel);
  color: var(--ink);
  font-weight: 600;
  box-shadow: none;
}
.switch,
aside .themebtn,
#themeslot .themebtn {
  color: var(--ink);
  border: 0;
  background: var(--soft-2);
  border-radius: var(--pill);
}
.switch:hover {
  background: var(--line-strong);
  color: var(--ink);
}
.sidebottom {
  background: var(--surface);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.who > div {
  color: var(--ink);
}
.who small,
.sidebottom small {
  color: var(--muted);
}
.avatar {
  background: var(--accent-soft);
  color: var(--green);
  border: 0;
}
.contabtns {
  border-top: 1px solid var(--line);
}
.contabtn {
  color: var(--ink);
  min-height: 36px;
}
.contabtn svg {
  color: var(--green);
}
.contabtn:hover {
  background: var(--soft);
  color: var(--ink);
}

/* Cartões: cantos de 18 px, sem moldura, sombra quase invisível. */
.card,
.topiclist,
.today,
.hero {
  border-radius: 18px;
  border-color: transparent;
}
.today,
.hero {
  background: var(--surface);
  box-shadow: var(--shadow);
}
.progress,
.progress i {
  border-radius: var(--pill);
}
.pill {
  background: var(--accent-soft);
  font-weight: 600;
}

/* Botões em cápsula com azul do sistema; pressionar encolhe um pouco, como no iOS. */
button,
.btn {
  border-radius: var(--pill);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    transform 0.1s var(--ease),
    background-color 0.2s var(--ease),
    filter 0.2s var(--ease);
}
button:active:not(:disabled),
.btn:active {
  transform: scale(0.97);
}
button:hover,
.btn:hover {
  filter: brightness(1.08);
}
.segmented {
  border-radius: 10px;
  padding: 2px;
  gap: 0;
  background: var(--soft-2);
}
.segmented button {
  border-radius: 8px;
  font-weight: 500;
  color: var(--ink);
}
.segmented button.selected {
  background: var(--surface);
  font-weight: 600;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.12),
    0 3px 1px rgba(0, 0, 0, 0.04);
}
:root[data-theme='dark'] .segmented button.selected {
  background: #636366;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .segmented button.selected {
    background: #636366;
  }
}

/* Campos: fundo cinza, cantos de 12 px, anel azul no foco. */
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']),
select,
textarea {
  font-family: var(--body);
  border-radius: 12px;
}
input:not([type='checkbox']):not([type='radio']):not([type='range']):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--btn);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--btn);
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Toque: no celular e no tablet, todo botão tem pelo menos 44 px de altura. */
@media (pointer: coarse) {
  button,
  .btn,
  select,
  input:not([type='checkbox']):not([type='radio']):not([type='range']) {
    min-height: 44px;
  }
}

/* Celular: topo branco com linha fina; abas numa só linha que rola para o lado. */
@media (max-width: 650px) {
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px 10px;
  }
  nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 12px -16px 0;
    padding: 2px 16px 4px;
    scroll-snap-type: x proximity;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  nav a {
    flex: none;
    padding: 0 14px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--pill);
    font-size: 14px;
    overflow: visible;
    background: var(--soft-2);
    scroll-snap-align: start;
  }
  nav a.active {
    background: var(--ink);
    color: var(--paper);
    box-shadow: none;
  }
  h1 {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  .btn,
  nav a {
    transition: none;
  }
  button:active:not(:disabled),
  .btn:active {
    transform: none;
  }
}

/* Página de apresentação: seção preta de página de produto da Apple, ações em azul. */
.lbar {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lbar {
    background: #000;
  }
}
.lbar .brand,
.lfoot .brand {
  color: #f5f5f7;
}
.lnav .textbtn,
.lnav .themebtn,
.ltabs button {
  color: #d2d2d7;
}
.lnav > button:last-child,
button.big.gold,
.big.gold {
  background: #5856d6;
  color: #fff;
}
.lnav > button:last-child {
  padding: 8px 18px;
}
.landing-page .big {
  padding: 14px 26px;
  font-size: 17px;
  font-weight: 500;
}
.landing-page .big:not(.gold) {
  border-color: rgba(255, 255, 255, 0.35);
}
.ltabs button {
  border-color: rgba(255, 255, 255, 0.14);
  font-weight: 500;
}
.ltabs button.on {
  background: #f5f5f7;
  border-color: #f5f5f7;
  color: #1d1d1f;
}
.lhero {
  background: #000;
}
.lhero h1 {
  letter-spacing: -0.035em;
  font-weight: 700;
}
.mcard,
.tmock {
  color: #1d1d1f;
  border-radius: 20px;
}
.mcard small {
  color: #6e6e73;
}
.mrow i {
  background: #5856d6;
  border-radius: 0 980px 980px 0;
}
.mopts span {
  border-color: #d2d2d7;
  border-radius: 50%;
}
.mopts span.ok {
  background: #5856d6;
  border-color: #5856d6;
}
.mok {
  color: #1d7a3a !important;
}
.mdays {
  background: #1d1d1f;
  border-color: #2c2c2e;
  color: #fff;
}
.mdays small,
.mdays span {
  color: #a1a1a6;
}
.mbar {
  background: #3a3a3c;
}
.lchecks {
  color: #a1a1a6;
}
.lcursos {
  background: #000;
}

/* Celular: os três botões do topo viram círculos iguais de 40 px, sem contorno. */
@media (max-width: 650px) {
  .sidetools {
    top: 14px;
    gap: 8px;
  }
  .sidetools .switch,
  .sidetools .themebtn,
  #themeslot .themebtn,
  .homebtn {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--soft-2);
    color: var(--ink);
    font-size: 15px;
  }
  .sidetools .switch:has(.switchtxt:not([style*='none'])) {
    width: auto;
    padding: 0 14px;
    border-radius: var(--pill);
  }
  nav a,
  nav:has(.navhead) a {
    font-size: 14px;
    padding: 0 14px;
  }
}
@media (max-width: 420px) {
  .sidetools .switch:has(.switchtxt:not([style*='none'])) {
    width: 40px;
    padding: 0;
    border-radius: 50%;
  }
}

/* Números e etiquetas que eram em fonte mono passam para a SF com algarismos de largura fixa. */
:root {
  --mono: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.stat strong,
.countdown,
.timer,
.cktotal,
.num {
  font-variant-numeric: tabular-nums;
}

/* Checkout: forma escolhida em azul com o círculo de seleção do iOS; resumo em preto. */
.ckforma {
  border-radius: 14px;
  min-height: 64px;
}
.ckforma:hover {
  transform: none;
}
.ckforma.on {
  border-color: var(--btn);
  box-shadow: inset 0 0 0 1px var(--btn);
  background: var(--accent-soft);
}
.ckforma.on:after {
  border: 0;
  width: 22px;
  height: 22px;
  background: var(--btn)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}
.ckforma:after {
  width: 22px;
  height: 22px;
  border-width: 1.5px;
}
.ckforma em {
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}
.ckcampos legend,
.cklabel {
  letter-spacing: 0.02em;
  font-size: 12px;
}
.ckicone {
  border-radius: 10px;
}
.ckresumo {
  background: #000;
}
.cketapas .feita span {
  background: var(--btn);
  border-color: var(--btn);
}

/* Linhas de lista: cantos de 10 px (não cápsula) e seleção em azul, como numa lista do iOS. */
.trow {
  border-radius: 10px;
}
.trow.selected {
  background: var(--btn);
  color: #fff;
}
.trow.selected .tmeta {
  color: rgba(255, 255, 255, 0.8);
}

/* Sala de foco: "Começar" em azul, como as demais ações principais. */
.focuscard button:not(.secondary) {
  background: var(--btn);
  color: var(--on-btn);
}


/* ===== Rota Kerma: marca, gradiente e movimento =====
   Curvas e durações da Apple. Com "reduzir movimento" ligado, as entradas viram esmaecimentos
   e os movimentos contínuos param (bloco no fim do arquivo). */
:root {
  --ap-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ap-mola: cubic-bezier(0.34, 1.56, 0.64, 1);
  --kerma-grad: linear-gradient(90deg, #0894ff, #6e5cff 30%, #c959dd 55%, #ff2e54 78%, #ff9004);
}

/* Marca: "rota" + "kerma" em gradiente. */
.brand .kerma {
  font-style: normal;
  font-weight: 600;
  margin-left: 0.22em;
  background: var(--kerma-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand > span:not(.gold) {
  white-space: nowrap;
}

/* Topo da página inicial: fundo quase preto com uma luz colorida que gira devagar. */
.lhero {
  background: #050409;
  isolation: isolate;
}
.lhero::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(1100px, 140vw);
  aspect-ratio: 1;
  right: -25%;
  top: -45%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #0894ff, #6e5cff, #c959dd, #ff2e54, #ff9004, #0894ff);
  filter: blur(110px);
  opacity: 0.45;
  pointer-events: none;
  animation: ap-gira 26s linear infinite;
}
.lhero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(70% 60% at 20% 100%, rgba(5, 4, 9, 0.9), transparent 70%);
  pointer-events: none;
}
.isobg path {
  stroke: #a5a3ff;
}
.landing-page .label.gold {
  color: transparent;
  background: var(--kerma-grad);
  -webkit-background-clip: text;
  background-clip: text;
}
.lhero h1 {
  color: #fff;
}
.lhero h1 .ap-pal {
  display: inline-block;
}
.lhero h1 .ap-pal:nth-last-child(-n + 3) {
  background: var(--kerma-grad) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ap-correcor 6s linear infinite;
}
.landing-page .big.gold,
.lnav > button:last-child {
  background: var(--btn);
  color: #fff;
}
.mrow i,
.mopts span.ok,
.mbar i {
  background: var(--kerma-grad);
  border-color: transparent;
}
.mock {
  perspective: 1200px;
}

/* Faixa com as provas correndo, como as faixas de produtos da Apple. */
.lfaixa {
  overflow: hidden;
  background: #050409;
  padding: 22px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.lfaixa::before,
.lfaixa::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 12%;
  left: 0;
  background: linear-gradient(90deg, #050409, transparent);
  pointer-events: none;
}
.lfaixa::after {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, #050409, transparent);
}
.lfaixatrilho {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: ap-faixa 40s linear infinite;
}
.lfaixa:hover .lfaixatrilho {
  animation-play-state: paused;
}
.lfaixatrilho span {
  flex: none;
  padding: 10px 20px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* Frase grande que acende palavra por palavra ao rolar. */
.lfrase {
  background: #050409;
  padding: clamp(80px, 14vw, 180px) max(var(--pad), 24px);
}
.lfrase p {
  max-width: 22ch;
  margin: 0 auto;
  font: 700 clamp(30px, 5vw, 64px) / 1.1 var(--display);
  letter-spacing: -0.03em;
  color: #f5f5f7;
  text-align: left;
}
.lfrase .ap-acende {
  color: #3a3a3c;
  transition: color 0.4s var(--ap-expo);
}
.lfrase .ap-acende.on {
  color: #f5f5f7;
}
.lfrase .ap-acende.on.kw {
  background: var(--kerma-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Números grandes em gradiente. */
.lnums strong {
  background: var(--kerma-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cartões com ícone em gradiente. */
.lfeats .ficon {
  background: var(--kerma-grad);
  color: #fff;
}

/* Chamada final com fundo colorido em movimento. */
.lfinal {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.lfinal::before {
  content: '';
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: conic-gradient(from 90deg at 50% 50%, #0894ff, #6e5cff, #c959dd, #ff2e54, #ff9004, #0894ff);
  filter: blur(90px);
  opacity: 0.22;
  animation: ap-gira 30s linear infinite reverse;
}

/* ---- Movimento ---- */
.isobg {
  transform-origin: 50% 50%;
  animation: ap-gira 140s linear infinite;
}
.ap-intro .isobg path {
  stroke-dasharray: 1;
  animation: ap-traco 2.6s var(--ap-expo) backwards;
}
.ap-intro .isobg path:nth-child(2) { animation-delay: 0.15s; }
.ap-intro .isobg path:nth-child(3) { animation-delay: 0.3s; }
.ap-intro .isobg path:nth-child(4) { animation-delay: 0.45s; }

.ap-intro .lbar { animation: ap-desce 0.9s var(--ap-expo) backwards; }
.ap-intro .lherotext > :not(h1) { animation: ap-sobe 1s var(--ap-expo) backwards; }
.ap-intro .lherotext > :nth-child(1) { animation-delay: 1s; }
.ap-intro .lherotext > :nth-child(3) { animation-delay: 1.6s; }
.ap-intro .lherotext > :nth-child(4) { animation-delay: 1.75s; }
.ap-intro .lhero h1 .ap-pal {
  animation: ap-palavra 1s var(--ap-expo) backwards;
  animation-delay: calc(1.1s + var(--i) * 0.06s);
}
.ap-intro .lhero h1 .ap-pal:nth-last-child(-n + 3) {
  animation: ap-palavra 1s var(--ap-expo) backwards, ap-correcor 6s linear infinite;
  animation-delay: calc(1.1s + var(--i) * 0.06s), 0s;
}
.lherotext {
  opacity: calc(1 - var(--ap-p, 0) * 0.8);
  translate: 0 calc(var(--ap-p, 0) * 60px);
  scale: calc(1 - var(--ap-p, 0) * 0.06);
}
.mock {
  translate: 0 calc(var(--ap-p, 0) * -90px);
  rotate: x var(--ap-rx, 0deg);
  transform-style: preserve-3d;
  transition: rotate 0.6s var(--ap-expo);
}
.mock .mcard { animation: ap-flutua 6s ease-in-out infinite; }
.mock .mcard:nth-child(2) { animation-duration: 7s; animation-delay: -2.5s; }
.mock .mcard:nth-child(3) { animation-duration: 8s; animation-delay: -5s; }
.ap-intro .mock .mcard {
  animation: ap-surge 1.2s var(--ap-mola) backwards, ap-flutua 6s ease-in-out infinite;
  animation-delay: 0.6s, 1.8s;
}
.ap-intro .mock .mcard:nth-child(2) { animation-delay: 0.78s, 2s; animation-duration: 1.2s, 7s; }
.ap-intro .mock .mcard:nth-child(3) { animation-delay: 0.96s, 2.2s; animation-duration: 1.2s, 8s; }
@media (hover: hover) and (pointer: fine) {
  .mock {
    transform: perspective(1200px) rotateY(var(--ap-ry, 0deg));
    transition: rotate 0.6s var(--ap-expo), transform 0.6s var(--ap-expo);
  }
}
.ap-intro .mrow i,
.ap-intro .mbar i {
  transform-origin: 0 50%;
  animation: ap-barra 1.4s var(--ap-expo) backwards;
}
.ap-intro .mrow:nth-of-type(1) i { animation-delay: 1.1s; }
.ap-intro .mrow:nth-of-type(2) i { animation-delay: 1.2s; }
.ap-intro .mrow:nth-of-type(3) i { animation-delay: 1.3s; }
.ap-intro .mrow:nth-of-type(4) i { animation-delay: 1.4s; }
.ap-intro .mbar i { animation-delay: 1.5s; animation-duration: 2s; }
.ap-intro .mopts span { animation: ap-pop 0.55s var(--ap-mola) backwards; }
.ap-intro .mopts span:nth-child(1) { animation-delay: 1.2s; }
.ap-intro .mopts span:nth-child(2) { animation-delay: 1.27s; }
.ap-intro .mopts span:nth-child(3) { animation-delay: 1.34s; }
.ap-intro .mopts span:nth-child(4) { animation-delay: 1.41s; }
.ap-intro .mopts span:nth-child(5) { animation-delay: 1.48s; }
.ap-intro .mopts span.ok { animation: ap-acerto 0.8s var(--ap-mola) 1.9s backwards; }
.ap-intro .mok { animation: ap-sobe 0.7s var(--ap-expo) 2.3s backwards; }

/* Seções que aparecem ao rolar. */
.ap-rev {
  opacity: 0;
  transform: translateY(48px) scale(0.97);
  transition: opacity 1s var(--ap-expo) var(--d, 0s), transform 1.2s var(--ap-expo) var(--d, 0s);
}
.ap-rev.ap-in {
  opacity: 1;
  transform: none;
}

@media (hover: hover) {
  .ltrilha.ap-in,
  .lfeats > article.ap-in {
    transition: transform 0.5s var(--ap-expo), box-shadow 0.5s var(--ap-expo);
  }
  .ltrilha:hover,
  .lfeats > article:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 30px 60px rgba(88, 86, 214, 0.22);
  }
  .landing-page .big {
    transition: transform 0.35s var(--ap-expo), background-color 0.2s, box-shadow 0.35s;
  }
  .landing-page .big:hover {
    transform: scale(1.04);
  }
  .landing-page .big.gold:hover {
    box-shadow: 0 12px 36px rgba(110, 92, 255, 0.55);
  }
}

/* Telas do estudo: os blocos entram em cascata quando a tela muda. */
#app.ap-entra > * {
  animation: ap-tela 0.65s var(--ap-expo) backwards;
}
#app.ap-entra > :nth-child(2) { animation-delay: 0.06s; }
#app.ap-entra > :nth-child(3) { animation-delay: 0.12s; }
#app.ap-entra > :nth-child(4) { animation-delay: 0.18s; }
#app.ap-entra > :nth-child(5) { animation-delay: 0.24s; }
#app.ap-entra > :nth-child(n + 6) { animation-delay: 0.3s; }
.card {
  transition: transform 0.35s var(--ap-expo), box-shadow 0.35s var(--ap-expo);
}
#nav a {
  transition: background-color 0.25s var(--ap-expo), color 0.25s, transform 0.2s var(--ap-expo);
}
#nav a:active {
  transform: scale(0.96);
}

@keyframes ap-sobe {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
}
@keyframes ap-palavra {
  from { opacity: 0; transform: translateY(0.6em) rotate(4deg); filter: blur(10px); }
}
@keyframes ap-tela {
  from { opacity: 0; transform: translateY(18px); }
}
@keyframes ap-desce {
  from { opacity: 0; transform: translateY(-100%); }
}
@keyframes ap-surge {
  from { opacity: 0; transform: translateY(80px) scale(0.9) rotate(-2deg); }
}
@keyframes ap-flutua {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
@keyframes ap-barra {
  from { transform: scaleX(0); }
}
@keyframes ap-pop {
  from { opacity: 0; transform: scale(0.3); }
}
@keyframes ap-acerto {
  0% { transform: scale(1); background: transparent; color: inherit; }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
@keyframes ap-traco {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes ap-gira {
  to { transform: rotate(360deg); }
}
@keyframes ap-correcor {
  to { background-position: -200% 0; }
}
@keyframes ap-faixa {
  to { transform: translateX(calc(-50% - 7px)); }
}

/* "Reduzir movimento" ligado: sem deslocamentos, só esmaecimentos; nada gira, flutua ou corre. */
@media (prefers-reduced-motion: reduce) {
  @keyframes ap-sobe { from { opacity: 0; } }
  @keyframes ap-palavra { from { opacity: 0; } }
  @keyframes ap-tela { from { opacity: 0; } }
  @keyframes ap-desce { from { opacity: 0; } }
  @keyframes ap-surge { from { opacity: 0; } }
  @keyframes ap-pop { from { opacity: 0; } }
  @keyframes ap-acerto { from { opacity: 0.4; } }
  @keyframes ap-barra { from { opacity: 0; } }
  .lhero::before,
  .lfinal::before,
  .isobg,
  .mock .mcard,
  .ap-intro .mock .mcard,
  .lfaixatrilho {
    animation-name: none;
  }
  .ap-intro .mock .mcard { animation: ap-surge 0.8s ease backwards; animation-delay: 0.4s; }
  .ap-intro .lhero h1 .ap-pal:nth-last-child(-n + 3),
  .lhero h1 .ap-pal:nth-last-child(-n + 3) {
    animation: ap-palavra 0.8s ease backwards;
    animation-delay: calc(0.2s + var(--i) * 0.07s);
  }
  .lfaixatrilho {
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    padding-inline: 16px;
  }
  .lfaixatrilho .dup { display: none; }
  .ap-rev { transform: none; transition: opacity 0.8s ease var(--d, 0s); }
  .ltrilha:hover,
  .lfeats > article:hover,
  .landing-page .big:hover { transform: none; }
}

/* Barra lateral: com o nome maior (rota kerma), a sigla da prova vai para a linha de baixo. */
aside .brand {
  flex-wrap: wrap;
  row-gap: 0;
  font-size: 27px;
}
aside .brand .gold {
  flex-basis: 100%;
  margin: -2px 0 0;
  padding-left: 39px;
  font-size: 0.6em;
  letter-spacing: -0.01em;
}
@media (min-width: 651px) and (max-width: 1000px) {
  aside .brand {
    font-size: 22px;
  }
}

/* ===== Logo do Rota Kerma ===== */
.brand .logo {
  width: 1.15em;
  height: 1em;
  min-width: 30px;
  min-height: 26px;
}
.logo .k-orb {
  stroke-width: 16;
}
.lmarca {
  grid-column: 1 / -1;
  justify-self: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(0px, 2vw, 16px);
}
.lmarcak {
  width: clamp(140px, 17vw, 230px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 18px 50px rgba(110, 92, 255, 0.35));
}
.lmarcak * {
  transform-box: fill-box;
  transform-origin: center;
}
.lmarcak .k-orbitas {
  transform-box: view-box;
  transform-origin: 300px 230px;
}
.k-brilho {
  fill: #ff8a00;
  opacity: 0;
}
.lmarcanome {
  display: flex;
  gap: 0.22em;
  font: 700 clamp(40px, 6.4vw, 84px) / 1 var(--display);
  letter-spacing: -0.045em;
  color: #fff;
}
.lmarcanome .kerma {
  background: var(--kerma-grad) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ap-correcor 6s linear infinite;
}

/* Entrada: órbitas se desenham, a haste cai, o arco cresce até o ponto, a perna desliza, o ponto acende. */
.lmarcak { animation: ap-flutua 7s ease-in-out infinite; }
.lmarcak .k-orbitas { animation: k-balanco 10s ease-in-out infinite; }
.lmarcak .k-brilho { animation: k-pulso 2.8s ease-out 2.4s infinite; }
.ap-intro .lmarcak .k-orb {
  stroke-dasharray: 1;
  animation: ap-traco 1.5s var(--ap-expo) 0.1s backwards;
}
.ap-intro .lmarcak .k-dir { animation-delay: 0.3s; }
.ap-intro .lmarcak .k-haste { animation: k-cai 0.9s var(--ap-mola) 0.3s backwards; }
.ap-intro .lmarcak .k-revela {
  stroke-dasharray: 1;
  animation: ap-traco 1.1s var(--ap-expo) 0.55s backwards;
}
.ap-intro .lmarcak .k-perna { animation: k-perna 0.9s var(--ap-mola) 0.85s backwards; }
.ap-intro .lmarcak .k-ponto { animation: k-ponto 0.8s var(--ap-mola) 1.3s backwards; }
.ap-intro .lmarcanome span { animation: ap-palavra 1s var(--ap-expo) 1s backwards; }
.ap-intro .lmarcanome .kerma {
  animation: ap-palavra 1s var(--ap-expo) 1.15s backwards, ap-correcor 6s linear infinite;
}
@media (hover: hover) {
  .lmarcak .k-ponto { transition: transform 0.5s var(--ap-mola); }
  .lmarca:hover .k-ponto { transform: scale(1.35); }
}

@keyframes k-balanco {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}
@keyframes k-pulso {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(3.2); }
}
@keyframes k-cai {
  from { opacity: 0; transform: translateY(-80px); }
}
@keyframes k-perna {
  from { opacity: 0; transform: translate(70px, 60px); }
}
@keyframes k-ponto {
  from { opacity: 0; transform: scale(0); }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes k-cai { from { opacity: 0; } }
  @keyframes k-perna { from { opacity: 0; } }
  @keyframes k-ponto { from { opacity: 0; } }
  .lmarcak,
  .lmarcak .k-orbitas,
  .lmarcak .k-brilho {
    animation: none;
  }
  .ap-intro .lmarcanome .kerma { animation: ap-palavra 1s ease 1.15s backwards; }
}
