/* Palette and type follow the Talis EMR design system, used as a guide for the marketing site. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #0a2540;
  --ink-2: #0f2f50;
  --chrome-text: #d3dcea;
  --chrome-muted: #b9c6d8;
  --chrome-field: rgba(255, 255, 255, 0.1);
  --chrome-line: rgba(255, 255, 255, 0.28);
  --slate-700: #425466;
  --slate-600: #5b6b7f;
  --slate-400: #8b9198;
  --line: #dce2e9;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --tab-strip: #e9eef4;
  --cobalt: #1d5fd1;
  --cobalt-tint: #eaf1fd;
  --link: #1a56c0;
  --ok: #047857;
  --warn-text: #7a4f0f;
  --warn-bg: #fbf3e2;
  --warn-line: #e6d4a9;
  --ai: #6d3fd9;
  --ai-bg: #f3effe;
  --ai-line: rgba(109, 63, 217, 0.45);

  --sans: "Plus Jakarta Sans", system-ui, sans-serif;

  --topbar-h: 64px;
  --radius-tab: 8px;
  --radius-control: 12px;
  --container: 1120px;
  --gutter: 20px;
  --target: 44px;
  --demo-overlap: 200px;

  --dur-hover: 120ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: #c3cddb var(--surface);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  caret-color: var(--cobalt);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

h1,
h2,
p,
dl,
dd,
ol,
figure {
  margin: 0;
}

main {
  flex: 1 0 auto;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 12px;
  border-radius: var(--radius-tab);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 10px;
}

h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.875rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Buttons */
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--cobalt);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.2), 0 8px 20px -10px rgba(29, 95, 209, 0.8);
  transition: background-color var(--dur-hover), box-shadow 200ms var(--ease-out), border-color var(--dur-hover);
}

.button:hover {
  background: #2c6be0;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.2), 0 12px 26px -10px rgba(29, 95, 209, 0.9);
}

.button--ghost {
  border-color: var(--chrome-line);
  background: transparent;
  box-shadow: none;
}

.button--ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: var(--chrome-field);
  box-shadow: none;
}

.button--light {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
}

.button--light:hover {
  background: var(--cobalt-tint);
  color: var(--ink);
}

.button:focus-visible,
.topbar a:focus-visible,
.cta a:focus-visible {
  outline-color: #ffffff;
}

.text-button {
  min-height: var(--target);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-tab);
  background: transparent;
  color: var(--link);
  font: 600 14px/1 var(--sans);
  cursor: pointer;
  transition: background-color var(--dur-hover);
}

.text-button[hidden] {
  display: none;
}

.text-button:hover {
  background: var(--cobalt-tint);
}

.text-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Top bar */
.topbar {
  background: var(--ink);
}

.topbar__inner {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar__brand {
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.topbar__brand:hover {
  color: #ffffff;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar__link {
  min-height: var(--target);
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius-tab);
  color: var(--chrome-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--dur-hover), color var(--dur-hover);
}

.topbar__link:hover {
  background: var(--chrome-field);
  color: #ffffff;
}

.topbar__link--cta {
  border: 1px solid var(--chrome-line);
  color: #ffffff;
}

/* Hero */
.hero {
  position: relative;
  display: flow-root;
  background: var(--ink);
  color: #ffffff;
  padding-top: clamp(64px, 4rem + 4vw, 128px);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 1.1rem + 5.4vw, 5.5rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.mark {
  padding: 0 0.08em;
  margin-inline: -0.04em;
  border-radius: 0.12em;
  background-image: linear-gradient(var(--ai), var(--ai));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 80%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  animation: mark-draw 900ms var(--ease-out) 350ms backwards;
}

@keyframes mark-draw {
  from {
    background-size: 0% 80%;
  }
}

.hero__lead {
  max-width: 54ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--chrome-text);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The demo straddles the hero's bottom edge. */
.hero .demo {
  position: relative;
  z-index: 1;
  margin-top: clamp(56px, 3rem + 3vw, 96px);
  margin-bottom: calc(-1 * var(--demo-overlap));
}

/* Problem */
.problem {
  padding-top: calc(var(--demo-overlap) + 112px);
  padding-bottom: 112px;
  overflow: hidden;
}

.problem__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 64px;
}

.problem__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.problem__copy p {
  max-width: 52ch;
  font-size: 18px;
  color: var(--slate-700);
}

.ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  width: 128%;
  transform: rotate(-4deg) translateX(2%);
  mask-image: linear-gradient(to right, #000 35%, transparent 92%), linear-gradient(to bottom, #000 60%, transparent);
  mask-composite: intersect;
  -webkit-mask-image: linear-gradient(to right, #000 35%, transparent 92%);
}

.ledger__form {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.05), 0 10px 24px -18px rgba(10, 37, 64, 0.35);
}

.ledger__form p {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-600);
  font-variant-numeric: tabular-nums;
}

.ledger__form span {
  font-size: 11px;
  color: var(--slate-600);
}

.ledger__form i {
  height: 8px;
  border-radius: 4px;
  background: var(--tab-strip);
}

.ledger__form i:nth-of-type(2n) {
  width: 70%;
}

/* How it works */
.how {
  padding-block: 112px;
  background: var(--tab-strip);
}

.how h2 {
  max-width: 20ch;
}

.how__lead {
  max-width: 56ch;
  margin-top: 20px;
  font-size: 18px;
  color: var(--slate-700);
}

.fills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 64px;
  margin-top: 56px;
}

.fills__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0 32px;
  border-top: 1px solid #c9d3df;
}

.fills__item dt {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.fills__item dd {
  max-width: 44ch;
  color: var(--slate-700);
}

.control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
  margin-top: 40px;
  padding: 28px 32px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.06), 0 18px 40px -28px rgba(10, 37, 64, 0.45);
}

.control__states {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control__states > svg {
  width: 24px;
  height: 12px;
  fill: none;
  stroke: var(--slate-400);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.state--prepared {
  border-style: dashed;
  border-color: var(--ai-line);
  background: var(--ai-bg);
  color: var(--ai);
}

.state--confirmed {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.state--confirmed svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ok);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control__copy {
  flex: 1 1 360px;
  max-width: 62ch;
  color: var(--slate-700);
}

.control__copy strong {
  color: var(--ink);
}

/* Founders */
.founders {
  padding-block: 112px;
}

.founders__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px 64px;
  align-items: start;
}

.founders p {
  max-width: 54ch;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.55;
  color: var(--slate-700);
}

/* Call to action */
.cta {
  padding-block: 96px;
  background: var(--ink);
  color: #ffffff;
}

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
}

.cta__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta h2 {
  max-width: 18ch;
}

.cta__copy p {
  font-size: 18px;
  color: var(--chrome-text);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.cta__address {
  color: var(--chrome-text);
  font-weight: 600;
}

.cta__address:hover {
  color: #ffffff;
}

/* Footer */
.footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-block: 24px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--chrome-muted);
}

@media (max-width: 880px) {
  :root {
    --demo-overlap: 120px;
  }

  .problem__grid,
  .founders__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .ledger {
    width: 140%;
  }

  .fills {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  :root {
    --demo-overlap: 96px;
  }

  .topbar__link:not(.topbar__link--cta) {
    display: none;
  }

  .problem,
  .how,
  .founders {
    padding-block: 72px;
  }

  .problem {
    padding-top: calc(var(--demo-overlap) + 72px);
  }

  .ledger {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    width: 160%;
  }

  .control {
    padding: 22px;
  }

  .cta {
    padding-block: 72px;
  }
}

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

  .mark {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
  }
}
