/* Caderneta tokens from apps/web/src/styles/tokens.css, trimmed to what the landing page uses. */
@font-face {
  font-family: "Fraunces";
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-standard-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --surface: #fffdf9;
  --ink: #1f2a24;
  --ink-2: #5b665f;
  --line: #e3ddd0;
  --line-strong: #7f8983;
  --accent: #0f6d5b;
  --accent-strong: #0b5446;
  --accent-soft: #dff0e8;
  --original-paper: #fff;
  --source-selection: #0f6d5b;
  --type-exam-bg: #edf3ee;
  --type-exam-fg: #4b6e64;
  --type-vaccination-bg: #f4ecd9;
  --type-vaccination-fg: #8c702c;
  --type-document-bg: #f1e8e5;
  --type-document-fg: #916452;
  --type-prescription-bg: #eaeaf3;
  --type-prescription-fg: #6b6091;
  --tone-0-bg: #dbe9f4;
  --tone-0-fg: #1f5677;
  --tone-1-bg: #fbe4cc;
  --tone-1-fg: #8a4a12;
  --tone-2-bg: #e9e2f6;
  --tone-2-fg: #503c8c;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-prov: "IBM Plex Mono", ui-monospace, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(36, 59, 53, 0.06), 0 4px 12px rgba(36, 59, 53, 0.06);
  --shadow-2: 0 8px 24px rgba(36, 59, 53, 0.14);
  --tap: 44px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 15px / 1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 600 22px / 1 var(--font-display);
  font-variation-settings: "opsz" 20;
  letter-spacing: -0.02em;
}
.brand img {
  width: 28px;
  height: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font: 600 16px / 1 var(--font-body);
  text-decoration: none;
}
.button:hover {
  border-color: var(--accent);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.mono {
  font-family: var(--font-prov);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--ink-2);
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.doc-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 40px;
  border-radius: var(--radius-sm);
  flex: none;
}
.type-exam {
  background: var(--type-exam-bg);
  color: var(--type-exam-fg);
}
.type-vaccination {
  background: var(--type-vaccination-bg);
  color: var(--type-vaccination-fg);
}
.type-document {
  background: var(--type-document-bg);
  color: var(--type-document-fg);
}
.type-prescription {
  background: var(--type-prescription-bg);
  color: var(--type-prescription-fg);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 28px;
}
header {
  display: flex;
  align-items: center;
  min-height: 80px;
  gap: 24px;
}
header nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
  align-items: center;
}
header nav a:not(.button) {
  color: var(--ink-2);
  text-decoration: none;
}
header .button {
  min-height: var(--tap);
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero {
  padding-block: 48px 80px;
}
h1 {
  font-size: clamp(32px, 26px + 2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  margin: 0 0 20px;
}
h2 {
  font-size: clamp(26px, 22px + 1.1vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 48;
  margin: 0 0 16px;
}
.lead {
  font-size: clamp(17px, 15px + 0.4vw, 19px);
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: 28px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.fine {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 14px;
}
figure {
  margin: 0;
}
/* Source document */
.paper {
  background: var(--original-paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
  padding: 28px;
  font: 400 12px / 1.5 var(--font-prov);
  transform: rotate(-1deg);
}
.paper p {
  margin-bottom: 18px;
}
.row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.hit {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 8px;
  margin: 26px -8px 0;
  border: 2px solid var(--source-selection);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--source-selection) 6%, #fff);
}
.hit-label {
  position: absolute;
  bottom: calc(100% + 3px);
  left: -2px;
  background: var(--source-selection);
  color: #fff;
  padding: 0 6px;
  border-radius: 4px 4px 0 0;
}
.card {
  position: relative;
  width: 250px;
  margin: -36px 0 0 auto;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.card dt {
  font-size: 13px;
  color: var(--ink-2);
}
.card dd {
  margin: 2px 0 4px;
  font-weight: 600;
  font-size: 17px;
}
.card small {
  font: 400 12px / 1.4 var(--font-prov);
  color: var(--ink-2);
}

/* Lifetime timeline */
.history {
  padding-block: 80px;
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.history .split {
  grid-template-columns: 0.95fr 1.05fr;
}
.people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 14px;
  color: var(--ink-2);
}
.chip.selected {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  background: var(--surface);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 600 15px / 1 var(--font-display);
}
.tone-0 {
  background: var(--tone-0-bg);
  color: var(--tone-0-fg);
}
.tone-1 {
  background: var(--tone-1-bg);
  color: var(--tone-1-fg);
}
.tone-2 {
  background: var(--tone-2-bg);
  color: var(--tone-2-fg);
}
.chip.add {
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
}
.chip.add .avatar {
  border: 1px dashed var(--line-strong);
  font-family: var(--font-body);
  font-weight: 400;
}
.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  max-width: 460px;
}
.facts li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts .mono {
  font-size: 12px;
  color: var(--ink-2);
  padding-top: 3px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  border-left: 1px dashed var(--line-strong);
}
.timeline li {
  position: relative;
  padding-bottom: 14px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--line-strong);
}
.timeline li:first-child::before {
  background: var(--accent);
  border-color: var(--accent);
}
.timeline li.gap {
  padding: 2px 0 16px;
}
.timeline li.gap::before {
  display: none;
}
.timeline li.gap span {
  font: 400 12px / 1.4 var(--font-prov);
  color: var(--ink-2);
}
.month {
  font: 600 12px / 1 var(--font-display);
  color: var(--ink-2);
  margin: 0 0 6px;
}
.doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.doc div {
  flex: 1;
  min-width: 0;
}
.doc strong {
  display: block;
  font-size: 14px;
}
.doc small {
  font: 400 12px / 1.4 var(--font-prov);
  color: var(--ink-2);
}
.birth {
  font: 400 12px / 1.4 var(--font-prov);
  color: var(--ink-2);
  padding-left: 22px;
}

.button.disabled {
  min-height: var(--tap);
  font-size: 14px;
  gap: 8px;
  color: var(--ink-2);
  background: transparent;
  cursor: not-allowed;
}
.button.disabled:hover {
  border-color: var(--line);
}
.button.disabled small {
  font: 400 11px / 1 var(--font-prov);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.interest [hidden] {
  display: none;
}
.interest {
  max-width: 480px;
}
.interest label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
.interest-row {
  display: flex;
  gap: 8px;
}
.interest input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 0 14px;
  font: 400 16px / 1 var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}
.interest input::placeholder {
  color: var(--ink-2);
}
.interest input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.interest input[aria-invalid="true"] {
  border-color: #a13440;
}
.interest-done {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
}
.interest-done.error {
  background: #fbeeee;
  color: #a13440;
}
/* Without JavaScript, /interesse redirects to #interesse-ok or #interesse-erro. */
.interest-outcome {
  display: none;
}
.interest-outcome:target {
  display: block;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.interest button[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}
footer .brand {
  font-size: 18px;
}
footer .brand img {
  width: 22px;
  height: 22px;
}

footer {
  padding-block: 28px 40px;
  font-size: 13px;
  color: var(--ink-2);
}
footer .wrap {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
footer a {
  color: var(--ink-2);
}
footer span:last-child {
  margin-left: auto;
}

header .brand {
  min-height: var(--tap);
}
.button.disabled {
  white-space: nowrap;
}

@media (max-width: 899px) {
  .split,
  .history .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .split > * {
    max-width: 600px;
  }
  .split > figure {
    max-width: 520px;
    width: 100%;
  }
  .hero {
    padding-block: 24px 56px;
  }
  .history {
    padding-block: 56px;
  }
  .card {
    margin-right: 12px;
  }
}
@media (max-width: 600px) {
  .wrap {
    padding-inline: 18px;
  }
  .paper {
    padding: 20px;
  }
  .interest-row {
    flex-direction: column;
  }
  .facts li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  footer span:last-child {
    margin-left: 0;
    width: 100%;
  }
}
@media (max-width: 374px) {
  header {
    gap: 8px;
  }
  header .button.disabled {
    padding-inline: 10px;
    gap: 6px;
  }
  .button.disabled small {
    letter-spacing: 0;
    padding: 3px 5px;
  }
}
