/*
 * openemr.radiatus.com
 *
 * Clinical rather than corporate: a paper ground, ink that is nearly black but
 * not quite, and a single teal that does all the pointing. No build step.
 */

:root {
  --paper:     #fbfaf7;
  --surface:   #ffffff;
  --surface-2: #f2f1ec;
  --ink:       #16211f;
  --ink-2:     #485754;
  --ink-3:     #7c8a87;
  --line:      #e2e0d8;
  --line-2:    #cfccc1;
  --teal:      #0d6d5e;
  --teal-deep: #084b41;
  --teal-soft: #dcece8;
  --clay:      #a4551f;
  --clay-soft: #f6ebe1;
  --shadow:    0 1px 2px rgba(22,33,31,.05), 0 8px 24px rgba(22,33,31,.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #101614;
    --surface:   #17201e;
    --surface-2: #1d2725;
    --ink:       #e8ede9;
    --ink-2:     #a6b5b0;
    --ink-3:     #7b8a86;
    --line:      #26312e;
    --line-2:    #37443f;
    --teal:      #4cbca6;
    --teal-deep: #7fd4c2;
    --teal-soft: #14302b;
    --clay:      #d99a67;
    --clay-soft: #2e2117;
    --shadow:    0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.28);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 .35em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem);   line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; }
h3 { font-size: 1.1rem; margin: 0 0 .4em; }
p  { margin: 0 0 1.1em; }
a  { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }

code, .mono { font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .86em; }
code { background: var(--surface-2); padding: .1em .38em; border-radius: 4px; }

.wrap    { max-width: 1060px; margin: 0 auto; padding: 0 26px; }
.narrow  { max-width: 68ch; }
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: .74rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 .8em;
}
.lede  { font-size: 1.18rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(140%) blur(6px);
}
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand__mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(140deg, var(--teal), var(--teal-deep)); flex: none; }
.masthead nav { display: flex; gap: 22px; font-size: .93rem; }
.masthead nav a { color: var(--ink-2); text-decoration: none; }
.masthead nav a:hover { color: var(--teal); }
@media (max-width: 700px) { .masthead nav { display: none; } }

/* ---- hero -------------------------------------------------------------- */

.hero { padding: 84px 0 60px; }
.hero .lede { font-size: 1.28rem; }
.hero__thesis {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
  border-left: 3px solid var(--teal);
  padding: 2px 0 2px 22px;
  margin: 28px 0 34px;
  max-width: 60ch;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 9px;
  font-weight: 600; font-size: .96rem; text-decoration: none;
  background: var(--teal); color: #fff; border: 1px solid transparent;
}
.btn:hover { background: var(--teal-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); }

/* ---- sections ----------------------------------------------------------- */

section { padding: 62px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: none; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 26px; }
@media (max-width: 820px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px 22px 20px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card__tag {
  font-family: "IBM Plex Mono", monospace; font-size: .76rem; font-weight: 500;
  display: inline-block; padding: .16em .6em; border-radius: 5px; margin-bottom: 12px;
  background: var(--teal-soft); color: var(--teal-deep);
}
.card--core   { border-top: 3px solid var(--ink-3); }
.card--core   .card__tag { background: var(--surface-2); color: var(--ink-2); }
.card--bridge { border-top: 3px solid var(--clay); }
.card--bridge .card__tag { background: var(--clay-soft); color: var(--clay); }
.card--ess    { border-top: 3px solid var(--teal); }

/* ---- tables -------------------------------------------------------------- */

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 26px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 520px; }
th {
  text-align: left; font-family: "IBM Plex Mono", monospace;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-3); padding: 12px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 550; }
tr:last-child td { border-bottom: none; }
.yes { color: var(--teal); font-weight: 600; }
.no  { color: var(--clay); font-weight: 600; }

/* ---- demo panel ----------------------------------------------------------- */

.demo {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; box-shadow: var(--shadow);
}
.demo + .demo { margin-top: 14px; }
.demo__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.demo__head h3 { margin: 0; }
.creds {
  font-family: "IBM Plex Mono", monospace; font-size: .84rem;
  background: var(--surface-2); border-radius: 8px; padding: 12px 14px; margin-top: 14px;
  display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px;
}
.creds dt { color: var(--ink-3); }
.creds dd { margin: 0; color: var(--ink); word-break: break-all; }

.note {
  border-left: 3px solid var(--clay); background: var(--clay-soft);
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 22px 0;
  font-size: .95rem; color: var(--ink-2);
}
.note strong { color: var(--ink); }

ul.ticks { list-style: none; padding: 0; margin: 18px 0; }
ul.ticks li { padding-left: 26px; position: relative; margin: .5em 0; color: var(--ink-2); }
ul.ticks li::before { content: "→"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat__n { font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; line-height: 1; color: var(--teal); font-variant-numeric: tabular-nums; }
.stat__l { font-size: .82rem; color: var(--ink-3); margin-top: 6px; }

footer { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--ink-3); font-size: .9rem; }
footer a { color: var(--ink-2); }
