/* Site institucional do Acerto de Plantão. As decisões visuais estão em DESIGN.md, na raiz do repositório. */

@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/albert-sans-latin.woff2') format('woff2');
}

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #f1f3f6;
  --surface-2: #e4e7ec;
  --ink: #0a0b0d;
  --muted: #5b616e;
  --accent: #0162e8;
  --accent-strong: #004fc4;
  --accent-ink: #ffffff;
  --link: #0162e8;
  --up: #0a7a4f;
  --down: #c81e2c;
  --panel: #ffffff;
  --inv-bg: #0a0b0d;
  --inv-ink: #ffffff;
  --inv-muted: #a8acb3;

  --font: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.25rem, 1.1rem + 4.9vw, 5rem);

  --margin: clamp(1.25rem, 2.8vw, 2.5rem);
  --gutter: clamp(1rem, 1.7vw, 1.5rem);
  --section: clamp(6rem, 11vw, 11rem);
  --radius: 1.5rem;
  --radius-ui: 1rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0d;
    --surface: #16181c;
    --surface-2: #262a31;
    --ink: #ffffff;
    --muted: #a8acb3;
    --link: #6ea8ff;
    --up: #3ddc97;
    --down: #ff7882;
    --panel: #16181c;
    --inv-bg: #ffffff;
    --inv-ink: #0a0b0d;
    --inv-muted: #5b616e;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--step-body);
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a,
button,
input,
label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

[id] {
  scroll-margin-top: 1.5rem;
}

.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  padding: 0.625rem 1rem;
  border-radius: 100px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.07em;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.vh {
  position: absolute;
  width: 1px;
  height: 1px; /* taste-skill-ignore: texto só para leitor de tela */
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.up {
  color: var(--up);
}

.down {
  color: var(--down);
}

.wrap {
  padding-inline: var(--margin);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.head {
  font-size: var(--step-head);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

/* Navegação */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--margin);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  padding: 0;
  list-style: none;
  font-size: 1rem;
  font-weight: 500;
}

.nav-links a:not(.button) {
  display: inline-block;
  padding: 0.625rem 0;
  color: var(--ink);
  text-decoration-color: transparent;
  transition: text-decoration-color 180ms ease;
}

.nav-links a[aria-current='page'] {
  text-decoration-color: currentColor;
}

.nav-links .button {
  padding: 0 1.125rem;
}

@media (max-width: 720px) {
  .nav-links .optional {
    display: none;
  }
}

/* Botão */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.375rem;
  border: 0;
  border-radius: 100px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    background-color 180ms ease;
}

.button:active {
  transform: scale(0.97);
}

.button--large {
  min-height: 3.5rem;
  padding: 0 2rem;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background-color: var(--accent-strong);
  }

  .nav-links a:not(.button):hover,
  .quiet a:hover {
    text-decoration-color: currentColor;
  }
}

/* Primeira tela */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-inline: var(--margin) 0;
}

.hero-text {
  grid-column: 1 / span 7;
  grid-row: 1;
  padding-top: clamp(2.5rem, 7vw, 6.5rem);
  padding-bottom: 3rem;
  z-index: 1;
}

.hero h1 {
  max-width: 9.5em;
  font-size: var(--step-display);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero-text p {
  max-width: 40ch;
  margin-top: 1.5rem;
  color: var(--muted);
}

.hero-text .button {
  margin-top: 1.75rem;
}

.stage {
  grid-column: 5 / -1;
  grid-row: 1;
  margin-top: clamp(15rem, 27vw, 24rem);
  padding: 3.5rem var(--margin) 0 3.5rem;
  background: var(--accent);
  clip-path: polygon(6rem 0, 100% 0, 100% 100%, 0 100%, 0 6rem);
}

@media (max-width: 900px) {
  .hero {
    display: block;
    padding-inline: 0;
  }

  .hero-text {
    padding-inline: var(--margin);
  }

  .stage {
    margin-top: 0;
    padding: 2.5rem 1rem 0;
    clip-path: polygon(4.5rem 0, 100% 0, 100% 100%, 0 100%, 0 4.5rem);
  }
}

/* Pedaços de interface do app. Dentro de [data-ui] valem as convenções do produto. */

[data-ui] {
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.4;
  border-radius: var(--radius);
}

[data-ui] h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ui-label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.ui-big {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.ui-pad {
  padding: 1.5rem;
}

.ui-rows {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.ui-row {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-ui);
  background: var(--surface);
}

.ui-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.125rem 1rem;
}

.ui-line strong {
  font-weight: 600;
}

.ui-note {
  margin-top: 0.375rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.kv {
  display: grid;
  gap: 0.5rem;
}

.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.kv dt,
.kv dd {
  margin: 0;
}

.kv dt {
  color: var(--muted);
}

.kv .strong dt,
.kv .strong dd {
  color: var(--ink);
  font-weight: 600;
}

.field {
  padding: 0.375rem 0.25rem;
}

.field span {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* O repasse que se distribui */

.repasse {
  width: min(100%, 38.75rem);
  padding: 1.5rem 1.5rem 1.75rem;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.repasse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.repasse output {
  display: block;
  margin-top: 1rem;
}

.repasse label {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.repasse input[type='range'] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 2.75rem;
  margin: 0.25rem 0 0.75rem;
  background: transparent;
  cursor: pointer;
}

.repasse input[type='range']::-webkit-slider-runnable-track {
  height: 0.5rem;
  border-radius: 100px;
  background: var(--surface-2);
}

.repasse input[type='range']::-moz-range-track {
  height: 0.5rem;
  border-radius: 100px;
  background: var(--surface-2);
}

.repasse input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 2rem;
  height: 2rem;
  margin-top: -0.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 140ms var(--ease-out);
}

.repasse input[type='range']::-moz-range-thumb {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

.repasse input[type='range']:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.repasse progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 0.375rem;
  margin-top: 0.625rem;
  border: 0;
  border-radius: 100px;
  background: var(--surface-2);
  overflow: hidden;
}

.repasse progress::-webkit-progress-bar {
  background: var(--surface-2);
}

.repasse progress::-webkit-progress-value {
  background: var(--accent);
}

.repasse progress::-moz-progress-bar {
  background: var(--accent);
}

.repasse .kv {
  margin-top: 1rem;
  padding: 0 1rem;
}

/* Como funciona: o que você informa e o que volta */

.section {
  padding-top: var(--section);
}

.exchange-col {
  grid-column: 4 / span 6;
}

.exchange-col .head {
  margin-bottom: 3.5rem;
}

.exchange + .exchange {
  margin-top: 5.5rem;
}

.exchange > p {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.call {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.response {
  margin: 1rem 0 0 3.5rem;
  background: var(--surface);
}

.response--wide {
  width: min(47.5rem, 100vw - var(--margin) * 2);
  margin-left: 3.5rem;
}

.open-today {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem;
  align-items: end;
}

@media (max-width: 900px) {
  .exchange-col {
    grid-column: 1 / -1;
  }

  .response,
  .response--wide {
    width: auto;
    margin-left: 0;
  }

  .open-today {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .call {
    grid-template-columns: 1fr;
  }
}

/* O que sai do app: nomes à esquerda, a folha à direita */

.showcase {
  align-items: start;
}

.outputs {
  grid-column: 1 / span 5;
  display: grid;
  gap: 0.25rem;
  padding-top: 4.5rem;
}

.outputs label {
  width: fit-content;
  color: var(--muted);
  font-size: var(--step-head);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
  cursor: pointer;
  transition: color 200ms ease;
}

.outputs input:checked + label {
  color: var(--ink);
}

.outputs input:focus-visible + label {
  outline: 3px solid var(--link);
  outline-offset: 4px;
  border-radius: 4px;
}

.sheet-stage {
  grid-column: 7 / -1;
  position: relative;
  height: min(88svh, 46rem);
  margin-right: calc(var(--margin) * -1);
  border-top-left-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.sheet {
  position: absolute;
  top: 4.5rem;
  left: 4rem;
  width: 35rem;
  max-width: calc(100% - 5rem);
  padding: 2.25rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 200ms ease,
    visibility 200ms;
}

.sheet--narrow {
  width: 27.5rem;
}

.showcase:has(#saida-resumo:checked) .sheet-resumo,
.showcase:has(#saida-plantao:checked) .sheet-plantao,
.showcase:has(#saida-repasse:checked) .sheet-repasse {
  opacity: 1;
  visibility: visible;
}

.sheet h3 {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.sheet .ui-label {
  margin-top: 0.25rem;
}

.sheet .figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.sheet .figures .ui-row p:nth-child(2) {
  margin-top: 0.25rem;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.sheet .ui-rows,
.sheet .kv {
  margin-top: 1.5rem;
}

.sheet .ui-big {
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .outputs {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    padding: 0 0 1.25rem;
  }

  .outputs label {
    font-size: var(--step-lead);
    letter-spacing: -0.015em;
  }

  .sheet-stage {
    grid-column: 1 / -1;
    height: 34rem;
    margin-inline: calc(var(--margin) * -1);
    border-radius: 0;
  }

  .sheet {
    top: 1rem;
    left: 1rem;
    width: calc(100% - 2rem);
    max-width: none;
    padding: 1.5rem;
  }
}

/* Comparação escrita por extenso */

.compare .head {
  grid-column: 1 / -1;
  margin-bottom: 3rem;
}

.compare-table {
  grid-column: 1 / -1;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--step-body);
  line-height: 1.35;
}

.compare-table col:first-child {
  width: 28%;
}

.compare-table th,
.compare-table td {
  padding: 1.375rem 1.25rem;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.compare-table thead th {
  padding-top: 2.25rem;
  font-weight: 600;
}

.compare-table tbody th {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.compare-table tbody tr:nth-child(odd) > * {
  background: var(--surface);
}

.compare-table tbody tr:nth-child(odd) > :first-child {
  border-radius: var(--radius-ui) 0 0 var(--radius-ui);
}

.compare-table tbody tr:nth-child(odd) > :last-child {
  border-radius: 0 var(--radius-ui) var(--radius-ui) 0;
}

.compare-table .ours,
.compare-table tbody tr:nth-child(odd) > .ours {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}

.compare-table thead .ours {
  border-radius: var(--radius) var(--radius) 0 0;
}

.compare-table tbody tr:last-child .ours {
  border-radius: 0 0 var(--radius) var(--radius);
}

@media (max-width: 900px) {
  .compare-table,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
  }

  .compare-table colgroup,
  .compare-table thead {
    display: none;
  }

  .compare-table tbody tr {
    margin-inline: calc(var(--margin) * -1);
    padding: 1.75rem var(--margin);
  }

  .compare-table tbody tr:nth-child(odd) {
    background: var(--surface);
  }

  .compare-table tbody tr > *,
  .compare-table tbody tr:nth-child(odd) > * {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .compare-table tbody th {
    margin-bottom: 1rem;
  }

  .compare-table td {
    margin-top: 0.75rem;
  }

  .compare-table td::before {
    content: attr(data-col);
    display: block;
    font-size: var(--step-small);
    font-weight: 600;
  }

  .compare-table tbody tr > .ours,
  .compare-table tbody tr:nth-child(odd) > .ours {
    margin-inline: calc(var(--margin) * -1);
    padding: 1rem var(--margin);
    border-radius: 0;
    background: var(--accent);
  }
}

/* A carta */

.letter {
  width: min(100%, 32.5rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 5rem);
}

.letter svg {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--accent);
}

.letter p {
  margin-top: 1.5rem;
  line-height: 1.55;
}

.letter mark {
  padding: 0.05em 0.2em;
  background: var(--surface-2);
  color: inherit;
}

.letter .sign {
  margin-top: 2.25rem;
  font-size: var(--step-lead);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.letter .role {
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: var(--step-small);
}

/* Fechamento com as cores invertidas, e a linha final */

.close {
  display: flex;
  flex-direction: column;
  margin-top: var(--section);
  min-height: 92svh;
  padding: clamp(3rem, 8vw, 7rem) var(--margin) 0;
  background: var(--inv-bg);
  color: var(--inv-ink);
}

.close h2 {
  font-size: clamp(3rem, 9.6vw, 10rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.close-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: auto;
  padding-top: 4rem;
}

.close-foot p {
  max-width: 30ch;
  font-size: var(--step-lead);
  line-height: 1.3;
}

.quiet {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding: 10rem 0 1.875rem;
  color: var(--inv-muted);
  font-size: var(--step-small);
}

.quiet ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0;
  list-style: none;
}

.quiet a {
  color: var(--inv-ink);
  text-decoration-color: transparent;
  transition: text-decoration-color 180ms ease;
}

.quiet > :last-child {
  text-align: right;
}

.quiet--page {
  margin-top: 30svh;
  padding: 0 var(--margin) 1.875rem;
  color: var(--muted);
}

.quiet--page a {
  color: var(--ink);
}

@media (max-width: 900px) {
  .close {
    min-height: 80svh;
  }

  .close h2 {
    font-size: 15vw;
  }

  .close-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .quiet {
    grid-template-columns: 1fr;
    padding-top: 6rem;
  }

  .quiet > :last-child {
    text-align: left;
  }

  .quiet--page {
    margin-top: 20svh;
    padding-top: 0;
  }
}

/* Páginas de texto: privacidade, termos, exclusão de conta, suporte */

.doc {
  padding: clamp(2.5rem, 7vw, 6.5rem) var(--margin) 0;
}

.doc > * {
  max-width: 42rem;
}

.doc h1 {
  max-width: 12em;
  font-size: var(--step-head);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.doc h2 {
  margin-top: 3.5rem;
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.doc h3 {
  margin-top: 2rem;
  font-size: var(--step-body);
  font-weight: 600;
}

.doc p,
.doc ul,
.doc ol,
.doc table {
  margin-top: 1rem;
}

.doc li + li {
  margin-top: 0.375rem;
}

.doc .lead {
  margin-top: 1.5rem;
  font-size: var(--step-lead);
  line-height: 1.35;
}

.doc .card {
  margin-top: 2.5rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
}

.doc .card > :first-child {
  margin-top: 0;
}

.doc .button {
  margin-top: 0.5rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.doc th,
.doc td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--surface-2);
  text-align: left;
  vertical-align: top;
}

.muted {
  color: var(--muted);
}

/* Movimento. Sem script ou com movimento reduzido, tudo já está no lugar. */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 700ms var(--ease-out),
      transform 900ms var(--ease-out);
  }

  .js [data-reveal='2'] {
    transition-delay: 80ms;
  }

  .js [data-reveal='3'] {
    transition-delay: 160ms;
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .js .shutter[data-reveal] {
    opacity: 1;
    transform: none;
    clip-path: polygon(6rem 0, 100% 0, 100% 0, 0 6rem, 0 6rem);
    transition: clip-path 1100ms var(--ease-in-out);
  }

  .js .shutter[data-reveal] > [data-ui] {
    transform: scale(1.06);
    transform-origin: top left;
    transition: transform 1500ms var(--ease-soft);
  }

  .js .shutter[data-reveal].is-in {
    clip-path: polygon(6rem 0, 100% 0, 100% 100%, 0 100%, 0 6rem);
  }

  .js .shutter[data-reveal].is-in > [data-ui] {
    transform: none;
  }

  @supports (animation-timeline: view()) {
    .drift {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }

    @keyframes drift {
      from {
        transform: translateY(3%);
      }

      to {
        transform: translateY(-3%);
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
