/* =============================================================================================
   confidin.io
   ---------------------------------------------------------------------------------------------
   The ConfidIn EHR product page on its own domain, matching www.fivepin.io/confidin/ehr/.

   THE TOKENS AND COMPONENTS BELOW ARE COPIED FROM app/globals.css, the fivepin.io stylesheet, so
   the two sites read as one family. This site has no build step, so it cannot import that file;
   when a token there changes, copy it here too. Only the header and footer blocks at the end are
   this site's own.
   ============================================================================================= */

:root {
  --navy-900: #0d2b3e;
  --navy-800: #123c52;
  --navy-700: #194b60;
  --navy-600: #1f6183;
  --green-600: #2e8f68;
  --green-500: #40b080;

  --bg: #ffffff;
  --bg-alt: #f4f7f9;
  --bg-sunk: #eaeff3;
  --surface: #ffffff;
  --text: #16232b;
  --text-muted: #4d5f6b;
  --border: #d8e0e6;
  --brand: var(--navy-700);
  --brand-ink: #ffffff;
  --accent: var(--green-600);
  --focus: #1f6183;
  --shadow: 0 1px 2px rgba(13, 43, 62, .06), 0 8px 24px rgba(13, 43, 62, .07);

  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3rem, 7vw, 5.5rem);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a21;
    --bg-alt: #13242e;
    --bg-sunk: #0a141a;
    --surface: #162831;
    --text: #e7eef2;
    --text-muted: #a3b5c0;
    --border: #27414f;
    --brand: #9fd4ec;
    --brand-ink: #0e1a21;
    --accent: var(--green-500);
    --focus: #7fc4e4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1rem; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }

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

/* The accessibility statement commits to keyboard access, so the skip link is a promise kept. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-ink);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip:focus { left: 0; }

.wrap { width: min(1120px, 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - var(--gutter) * 2); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }

/* ------------------------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: var(--navy-600); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-alt); }

/* ------------------------------------------------------------------------------- prose blocks */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose__updated { color: var(--text-muted); font-size: .92rem; }

/* --------------------------------------------------------------------------------- card grids */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }


/* ------------------------------------------------------------------- this site's header + footer */
.site-header { border-bottom: 1px solid var(--border); }
.site-header__bar { display: flex; align-items: center; gap: 1rem 1.5rem; min-height: 88px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand__name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; }
.brand__by { display: block; font-size: .85rem; color: var(--text-muted); font-weight: 500; }
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 1.05rem; }
.site-nav a:hover { color: var(--brand); text-decoration: underline; }

.site-footer {
  background: var(--navy-900); color: #cfe0ea;
  padding-block: clamp(2.5rem, 5vw, 3.5rem); margin-top: var(--section-y);
}
.site-footer a { color: #ffffff; }
.site-footer h2 { font-size: 1rem; color: #ffffff; margin-bottom: .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .25rem; }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer__legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.16); font-size: .88rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
