/* ============================================================
   Axiom — Landing institucional
   ------------------------------------------------------------
   Tokens portados do design system do backoffice
   (apps/web/src/styles/tokens.css): UI clara, acento
   indigo/violeta único, superfícies neutras, hairlines finas,
   sem gradientes de fundo.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Geist+Mono:wght@400;500&family=Instrument+Serif&display=swap");

:root {
  /* Neutral surfaces */
  --canvas:        #ffffff;
  --surface:       #fafafa;
  --surface-2:     #f4f4f5;
  --line:          #ececef;
  --line-strong:   #e1e1e4;

  /* Text */
  --fg-1:          #111114;
  --fg-2:          #3a3a40;
  --fg-3:          #6b6b73;
  --fg-4:          #9a9aa3;

  /* Accent (indigo/violet) */
  --accent:        #7c5cff;
  --accent-hover:  #6a48f4;
  --accent-press:  #5938db;
  --accent-soft:   #efeaff;
  --accent-tint:   #f7f4ff;
  --accent-line:   #d8ccff;
  --accent-ink:    #4a32c2;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont,
               "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", monospace;
  --font-serif: "Instrument Serif", ui-serif, "Iowan Old Style", Georgia, serif;

  --fs-display:    44px;
  --fs-h1:         28px;
  --fs-h2:         20px;
  --fs-h3:         16px;
  --fs-body:       14px;
  --fs-sm:         13px;
  --fs-xs:         12px;
  --fs-eyebrow:    11px;

  --lh-tight:      1.15;
  --lh-body:       1.5;
  --lh-loose:      1.65;

  --ls-eyebrow:    0.08em;
  --ls-tight:      -0.01em;
  --ls-display:    -0.02em;

  /* Spacing */
  --sp-2:   8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  32px;
  --sp-8:  40px;
  --sp-9:  56px;
  --sp-10: 72px;

  /* Radii */
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg: 12px;
  --r-pill: 999px;

  --sh-focus: 0 0 0 3px rgba(124, 92, 255, 0.25);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------- Base ---------------- */

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg-2);
  background: var(--canvas);
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  color: var(--fg-1);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover {
  color: var(--accent-press);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus);
  border-radius: var(--r-sm);
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---------------- Landing (index) ---------------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  gap: var(--sp-5);
}

.hero .brand-name {
  font-size: var(--fs-display);
  font-weight: 600;
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  color: var(--fg-1);
}

.hero .display {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 400;
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  color: var(--fg-1);
  max-width: 30ch;
}

.hero .sub {
  color: var(--fg-3);
  max-width: 44ch;
  font-size: 15px;
  line-height: var(--lh-loose);
}

.hero .contact {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--fg-1);
  color: #ffffff;
  font-weight: 500;
  font-size: var(--fs-body);
  transition: transform 120ms var(--ease-out), background-color 120ms var(--ease-out);
}
.hero .contact:hover {
  background: #26262c;
  color: #ffffff;
  text-decoration: none;
}
.hero .contact:active { transform: scale(0.96); }

/* Staggered enter — one-shot, gated on reduced motion */
@keyframes enter {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .enter-1, .enter-2, .enter-3, .enter-4, .enter-5 {
    animation: enter 500ms var(--ease-out) both;
  }
  .enter-2 { animation-delay: 100ms; }
  .enter-3 { animation-delay: 200ms; }
  .enter-4 { animation-delay: 300ms; }
  .enter-5 { animation-delay: 400ms; }
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--fg-3);
}

.site-footer .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
}

.site-footer .sep { color: var(--fg-4); }

.site-footer .fineprint {
  font-size: var(--fs-xs);
  color: var(--fg-4);
  max-width: 72ch;
}

/* ---------------- Policy page ---------------- */

.doc-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.doc-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.doc-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-1);
  font-weight: 600;
  font-size: 15px;
}
.doc-header .brand:hover { text-decoration: none; color: var(--fg-1); }
.doc-header .brand svg { width: 24px; height: 24px; display: block; }

.doc-header .back { font-size: var(--fs-sm); color: var(--fg-3); }
.doc-header .back:hover { color: var(--accent-press); }

.doc {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-9) var(--sp-6) var(--sp-10);
}

.doc h1 { font-size: var(--fs-h1); margin-bottom: var(--sp-5); }

.doc .callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-tint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
  color: var(--fg-2);
}

.doc .meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px var(--sp-5);
  font-size: var(--fs-sm);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--sp-5);
  margin: 0 0 var(--sp-7);
}
.doc .meta dt { color: var(--fg-3); font-weight: 500; margin: 0; }
.doc .meta dd { color: var(--fg-1); margin: 0; overflow-wrap: anywhere; }

.doc nav.toc {
  margin-bottom: var(--sp-8);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.doc nav.toc .eyebrow { display: block; margin-bottom: var(--sp-3); }
.doc nav.toc ol {
  margin: 0;
  padding-left: 1.4em;
  display: grid;
  gap: 6px;
  font-size: var(--fs-sm);
}

.doc section { margin-bottom: var(--sp-8); }
.doc section:last-of-type { margin-bottom: 0; }

.doc h2 {
  font-size: var(--fs-h2);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--accent-line);
  margin-bottom: var(--sp-5);
  scroll-margin-top: 72px;
}

.doc h3 {
  font-size: var(--fs-h3);
  margin: var(--sp-6) 0 var(--sp-3);
  scroll-margin-top: 72px;
}

.doc p { margin-bottom: var(--sp-3); }
.doc p:last-child { margin-bottom: 0; }

.doc ul {
  margin: 0 0 var(--sp-4);
  padding-left: 1.3em;
  display: grid;
  gap: 6px;
}

.doc strong { color: var(--fg-1); font-weight: 600; }

.doc .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  margin: 0 0 var(--sp-4);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.doc th {
  text-align: left;
  font-weight: 600;
  color: var(--fg-1);
  background: var(--surface);
  padding: 10px var(--sp-4);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.doc td {
  padding: 10px var(--sp-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.doc tr:last-child td { border-bottom: none; }

@media (max-width: 560px) {
  :root { --fs-display: 34px; }
  .doc { padding-top: var(--sp-7); }
  .doc .meta { grid-template-columns: 1fr; gap: 2px; }
  .doc .meta dt { margin-top: var(--sp-2); }
}
