/* crosschain.creditcard: portal jurídico e institucional dos programas de cartão.
   Neutro (sem marca de produto), escuro por padrão, com tema claro no botão do topo.
   Sem dependência externa: fontes e imagens servidas daqui. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── temas ── */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080808;
  --bg-raise: #0e0e0e;
  --bg-sunk: #050505;
  --ink: #f4f4f4;
  --text: #c8c8c8;
  --muted: #929292;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --accent: #a8a8a8;
  --accent-soft: rgba(255, 255, 255, 0.09);
  --btn-bg: #f4f4f4;
  --btn-ink: #080808;
  --visa: #ffffff;
  /* cores do desenho do hero (lidas pelo site.js) */
  --trace: 190, 190, 190;
  --trace-alpha: 0.3;
  --pulse: 240, 240, 240;
  --glow: 170, 170, 170;
  --header-bg: rgba(8, 8, 8, 0.72);
  --card-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.85), 0 18px 36px -18px rgba(0, 0, 0, 0.7);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f5;
  --bg-raise: #fbfbfb;
  --bg-sunk: #ebebeb;
  --ink: #0c0c0c;
  --text: #404040;
  --muted: #6c6c6c;
  --line: rgba(12, 12, 12, 0.11);
  --line-strong: rgba(12, 12, 12, 0.2);
  --accent: #5c5c5c;
  --accent-soft: rgba(12, 12, 12, 0.06);
  --btn-bg: #0c0c0c;
  --btn-ink: #f5f5f5;
  --visa: #0c0c0c;
  --trace: 50, 50, 50;
  --trace-alpha: 0.3;
  --pulse: 30, 30, 30;
  --glow: 40, 40, 40;
  --glow-a: 0.09;
  --header-bg: rgba(245, 245, 245, 0.78);
  --card-shadow: 0 50px 80px -34px rgba(20, 20, 20, 0.5), 0 18px 30px -18px rgba(20, 20, 20, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.serif {
  font-family: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.serif em { font-style: italic; color: var(--accent); }

/* ── topo ── */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.top.is-stuck,
.doc-page .top {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg { width: 26px; height: 26px; }
.brand small {
  font: 500 10.5px/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.nav {
  display: none;
  margin-left: auto;
  gap: 30px;
  font-size: 14px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }
@media (min-width: 860px) { .nav { display: flex; } }

.theme-btn {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.theme-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--accent-soft); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }
@media (min-width: 860px) { .theme-btn { margin-left: 0; } }

/* ── hero ── */
.hero {
  position: relative;
  min-height: min(100svh, 940px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}
/* grade fina de fundo, que some para as bordas */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 62% 45%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 62% 45%, #000 10%, transparent 78%);
}
/* luz atrás do cartão */
.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  left: var(--cx, 68%);
  top: var(--cy, 46%);
  width: min(900px, 120vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(var(--glow), var(--glow-a, 0.2)), rgba(var(--glow), calc(var(--glow-a, 0.2) / 4)) 55%, transparent 72%);
  pointer-events: none;
}
#net {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* as rotas ficam fortes perto do cartão e somem atrás do texto */
  -webkit-mask-image: radial-gradient(ellipse 54% 80% at var(--cx, 68%) var(--cy, 46%), #000 26%, rgba(0, 0, 0, 0.13) 100%);
  mask-image: radial-gradient(ellipse 54% 80% at var(--cx, 68%) var(--cy, 46%), #000 26%, rgba(0, 0, 0, 0.13) 100%);
}

@media (min-width: 1000px) {
  #net {
    -webkit-mask-image:
      radial-gradient(ellipse 54% 80% at var(--cx, 68%) var(--cy, 46%), #000 26%, rgba(0, 0, 0, 0.13) 100%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.28) 30%, #000 56%);
    mask-image:
      radial-gradient(ellipse 54% 80% at var(--cx, 68%) var(--cy, 46%), #000 26%, rgba(0, 0, 0, 0.13) 100%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.28) 30%, #000 56%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
}

.hero-in {
  flex: 1;
  display: grid;
  align-items: center;
  gap: 40px;
  padding-top: 120px;
  padding-bottom: 44px;
}
@media (min-width: 1000px) {
  .hero-in { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 32px; padding-top: 96px; }
}

.hero-copy { max-width: 600px; }
.hero-copy .mono { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.hero-copy .mono::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero h1 {
  font-size: clamp(44px, 6.3vw, 84px);
  line-height: 0.98;
  margin-bottom: 26px;
  text-wrap: balance;
}
.hero-lead {
  max-width: 520px;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.62;
  color: var(--text);
  margin-bottom: 34px;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn svg { width: 15px; height: 15px; transition: transform 0.25s; }
.btn:hover svg { transform: translateX(3px); }
.btn-solid { background: var(--btn-bg); color: var(--btn-ink); }
.btn-solid:hover { transform: translateY(-1px); }
.btn-line { border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ── o cartão em 3D ── */
.stage {
  position: relative;
  justify-self: center;
  width: clamp(250px, 68vw, 330px);
  aspect-ratio: 1536 / 969;
  perspective: 1400px;
  margin: 8px 0 26px;
}
@media (min-width: 1000px) {
  .stage { width: clamp(330px, 31vw, 450px); margin: 0; justify-self: end; margin-right: 4%; }
}
.card-tilt,
.card-float {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.card-tilt { transform: rotateX(16deg) rotateY(-24deg) rotateZ(3deg); will-change: transform; }
.card-float { animation: card-float 9s ease-in-out infinite; }
@keyframes card-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg); }
  50% { transform: translate3d(0, -10px, 0) rotateX(-2.2deg) rotateY(3deg); }
}
.card-face,
.card-ghost {
  position: absolute;
  inset: 0;
  border-radius: 4.6% / 7.3%;
}
.card-face {
  overflow: hidden;
  background: #101010;
  box-shadow:
    var(--card-shadow),
    0 0 calc(60px * var(--ping, 0)) rgba(var(--glow), calc(0.5 * var(--ping, 0)));
}
.card-face img { width: 100%; height: 100%; object-fit: cover; }
/* luz vinda de cima e fio de luz na borda */
.card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, 0.11), transparent 46%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.28));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 0 rgba(255, 255, 255, 0.26);
  pointer-events: none;
}
/* reflexo que atravessa o cartão */
.card-sheen {
  position: absolute;
  inset: -20%;
  background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.17) 50%, rgba(255, 255, 255, 0.05) 55%, transparent 62%);
  transform: translateX(var(--sheen, -70%));
  animation: card-sheen 8s cubic-bezier(0.6, 0, 0.3, 1) infinite;
  pointer-events: none;
}
@keyframes card-sheen {
  0%, 55% { transform: translateX(-70%); }
  85%, 100% { transform: translateX(70%); }
}
.card-meta {
  position: absolute;
  left: 6.5%;
  bottom: 9%;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  font: 500 clamp(8px, 0.82vw, 11px) / 1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.78);
}
.card-meta span:last-child { color: rgba(255, 255, 255, 0.45); }
/* contornos atrás do cartão: profundidade de "planta técnica" */
.card-ghost {
  border: 1px solid rgba(var(--trace), 0.46);
  background: linear-gradient(135deg, rgba(var(--trace), 0.05), transparent 60%);
}
.card-ghost.g1 { transform: translate3d(0, 0, -64px); }
.card-ghost.g2 { transform: translate3d(0, 0, -128px); opacity: 0.55; }
.stage-floor {
  position: absolute;
  left: 4%;
  right: -6%;
  bottom: -34%;
  height: 34%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.55), transparent 72%);
  filter: blur(14px);
  pointer-events: none;
}
:root[data-theme="light"] .stage-floor { background: radial-gradient(50% 50% at 50% 50%, rgba(20, 20, 20, 0.28), transparent 72%); }

/* ── ficha técnica no pé do hero ── */
.spec {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, var(--bg) 85%);
}
.spec-in {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.spec-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  min-height: 92px;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--line);
}
.spec-cell:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.spec-cell:nth-last-child(-n + 2) { border-bottom: 0; }
.spec-cell strong { font-size: 14.5px; font-weight: 550; color: var(--ink); line-height: 1.35; }
.visa-mark { height: 21px; width: auto; aspect-ratio: 24 / 7.9; align-self: flex-start; fill: var(--visa); }
@media (min-width: 900px) {
  .spec-in { grid-template-columns: repeat(4, 1fr); }
  .spec-cell { border-bottom: 0; padding-left: 24px; border-left: 1px solid var(--line); min-height: 104px; }
  .spec-cell:nth-child(even) { padding-left: 24px; }
  .spec-cell:first-child { padding-left: 0; border-left: 0; }
}

/* ── seções ── */
.section { padding: clamp(72px, 10vw, 132px) 0; border-bottom: 1px solid var(--line); }
.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: baseline; }
}
.section-head h2 {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.03;
  max-width: 17ch;
  text-wrap: balance;
}
.section-head p { max-width: 560px; margin-top: 16px; color: var(--text); }

/* documentos: índice em linhas */
.docs { border-top: 1px solid var(--line-strong); }
.doc-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 22px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.3s;
}
.doc-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.doc-row:hover { padding-left: 16px; padding-right: 16px; background: var(--accent-soft); }
.doc-row:hover::before { transform: scaleX(1); }
.doc-row .n { align-self: start; padding-top: 12px; }
.doc-row h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }
.doc-row p { grid-column: 2; font-size: 15px; color: var(--muted); max-width: 520px; }
.doc-row .when { display: none; }
.doc-row .go {
  grid-row: 1 / span 2;
  grid-column: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.35s;
}
.doc-row .go svg { width: 17px; height: 17px; }
.doc-row:hover .go { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; transform: rotate(-45deg); }
@media (min-width: 900px) {
  .doc-row { grid-template-columns: 220px minmax(0, 1fr) auto auto; padding: 30px 4px; gap: 6px 32px; }
  .doc-row .n { padding-top: 14px; }
  .doc-row p { grid-column: 2; }
  .doc-row .when { display: block; grid-row: 1 / span 2; grid-column: 3; }
  .doc-row .go { grid-column: 4; }
}

/* estrutura: três partes ligadas por um trilho */
.parties { position: relative; display: grid; gap: 0; }
.rail { display: none; }
.party { padding: 28px 0; border-top: 1px solid var(--line); }
.party .mono { display: block; margin-bottom: 14px; color: var(--accent); }
.party h3 { font-size: clamp(25px, 2.4vw, 32px); line-height: 1.12; margin-bottom: 12px; }
.party p { font-size: 15.5px; max-width: 34ch; }
@media (min-width: 900px) {
  .parties { grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 44px; }
  .party { border-top: 0; padding: 0; }
  .rail {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 13px;
  }
  .rail::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 6px;
    height: 1px;
    background: var(--line-strong);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
  }
  .is-in .rail::before { transform: scaleX(1); }
  .rail i {
    position: absolute;
    top: 0;
    width: 13px;
    height: 13px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.5s, transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
  }
  .rail i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
  .rail i:nth-child(1) { left: 0; transition-delay: 0.2s; }
  .rail i:nth-child(2) { left: calc((100% - 80px) / 3 + 40px); transition-delay: 0.6s; }
  .rail i:nth-child(3) { left: calc((100% - 80px) / 3 * 2 + 80px); transition-delay: 1s; }
  .is-in .rail i { opacity: 1; transform: none; }
  /* pulso que corre o trilho */
  .rail b {
    position: absolute;
    top: 5px;
    left: 0;
    width: 90px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--accent));
    opacity: 0;
  }
  .is-in .rail b { animation: rail-run 6.5s cubic-bezier(0.5, 0, 0.3, 1) 1.6s infinite; }
}
@keyframes rail-run {
  0% { left: 0; opacity: 0; }
  6% { opacity: 1; }
  62% { opacity: 1; }
  70%, 100% { left: calc(100% - 90px); opacity: 0; }
}

/* compromissos */
.commit {
  display: grid;
  border-top: 1px solid var(--line-strong);
}
.commit-item {
  position: relative;
  padding: 30px 0 32px;
  border-bottom: 1px solid var(--line);
}
.commit-item svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 20px; }
.commit-item h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 8px; }
.commit-item p { font-size: 15px; color: var(--text); max-width: 40ch; }
@media (min-width: 700px) {
  .commit { grid-template-columns: 1fr 1fr; }
  .commit-item { padding: 34px 32px 36px 0; }
  .commit-item:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
}
@media (min-width: 1000px) {
  .commit { grid-template-columns: repeat(3, 1fr); }
  .commit-item,
  .commit-item:nth-child(even) { padding: 38px 36px 40px 36px; border-left: 1px solid var(--line); }
  .commit-item:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
}

/* a rede */
.network {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--bg-raise);
}
.network .visa-mark { height: clamp(34px, 4.6vw, 52px); }
.network p { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--ink); max-width: 62ch; }
.network p + p { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
@media (min-width: 860px) { .network { grid-template-columns: auto minmax(0, 1fr); gap: 56px; } }

/* a empresa */
.facts { border-top: 1px solid var(--line-strong); }
.facts div {
  display: grid;
  gap: 4px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { padding-top: 3px; }
.facts dd { font-size: 16.5px; color: var(--ink); }
.facts dd a { text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.facts dd a:hover { color: var(--accent); text-decoration-color: var(--accent); }
@media (min-width: 900px) { .facts div { grid-template-columns: 220px minmax(0, 1fr); align-items: baseline; } }

/* ── rodapé ── */
.foot { padding: 44px 0 56px; background: var(--bg-sunk); }
.foot-in { display: grid; gap: 26px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot small { display: block; max-width: 78ch; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* ── entrada das seções ao rolar ── */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--d, 0) * 90ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ── páginas de documento ── */
.doc-page main { padding-top: 68px; }
.doc-tabs { border-bottom: 1px solid var(--line); background: var(--bg-raise); }
.doc-tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.doc-tabs a {
  position: relative;
  padding: 15px 14px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.doc-tabs a:first-child { padding-left: 0; }
@media (max-width: 480px) { .doc-tabs a { padding: 14px 8px; font-size: 13px; } }
@media (max-width: 480px) { .doc-tabs a[aria-current="page"]::after { left: 8px; right: 8px; } }
.doc-tabs a:hover { color: var(--ink); }
.doc-tabs a[aria-current="page"] { color: var(--ink); }
.doc-tabs a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.doc-tabs a:first-child[aria-current="page"]::after { left: 0; }

.doc-wrap { display: grid; gap: 48px; padding: clamp(40px, 6vw, 80px) 0 clamp(72px, 9vw, 120px); }
@media (min-width: 1000px) { .doc-wrap { grid-template-columns: 220px minmax(0, 720px); gap: 72px; } }

.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; }
  .toc-in { position: sticky; top: 104px; }
  .toc .mono { display: block; margin-bottom: 16px; }
  .toc ol { list-style: none; border-left: 1px solid var(--line); }
  .toc a {
    display: block;
    margin-left: -1px;
    padding: 6px 0 6px 16px;
    border-left: 1px solid transparent;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
  }
  .toc a:hover { color: var(--ink); }
  .toc a.is-on { color: var(--ink); border-left-color: var(--accent); }
}

.doc .crumbs { display: flex; gap: 10px; margin-bottom: 26px; }
.doc .crumbs a { color: var(--muted); text-decoration: none; }
.doc .crumbs a:hover { color: var(--accent); }
.doc h1 {
  font-family: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  font-weight: 400;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 14px;
}
.doc .updated {
  font: 500 11.5px/1.4 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}
.doc .summary {
  margin-bottom: 36px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 4px 14px 14px 4px;
  background: var(--bg-raise);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
}
.doc h2 {
  margin: 48px 0 14px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
}
.doc p, .doc li { font-size: 16px; margin-bottom: 14px; }
.doc ul { padding-left: 22px; margin-bottom: 14px; }
.doc li::marker { color: var(--muted); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc blockquote {
  margin: 6px 0 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 15.5px;
}

/* /sms/: os prints do cadastro */
.shots { margin: 0 0 8px; }
/* sem nenhum print publicado, a seção de exemplos (e a legenda) não aparece */
.shots:not(:has(figure)) { display: none; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.shot { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-raise); }
.shot img { width: 100%; height: auto; border-radius: 10px; }
.shot-caption { margin-top: 10px; color: var(--muted); font-size: 13.5px; text-align: center; }

/* 404 */
.lost { min-height: 100svh; display: grid; place-items: center; padding: 120px 0 80px; text-align: center; }
.lost h1 { font-size: clamp(48px, 8vw, 96px); line-height: 1; margin: 18px 0 16px; }
.lost p { color: var(--text); margin-bottom: 30px; }
.lost .actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
