/* =====================================================================
   Caresoft Imaging — public site
   Design direction: the reading room. Radiology is read in a dim room on
   a calibrated monitor; the film is the only bright thing in it. The page
   alternates between "reading room" (dark) and "film" (light) sections,
   and every piece of data is set in mono, the way it appears on a viewer's
   corner overlay.
   ===================================================================== */

:root {
  --ink:      #070B10;
  --ink-2:    #0D141C;
  --panel:    #131E29;
  --panel-2:  #18242F;
  --line:     #22323F;
  --line-2:   #2E4152;

  --film:     #F2F5F8;
  --film-2:   #FFFFFF;
  --film-3:   #E4EAF0;

  --text-dark:  #E9F0F6;
  --text-dim:   #91A4B5;
  --text-light: #101A22;
  --text-light-dim: #4E6072;

  --amber:    #F0A93B;
  --amber-dk: #C9861F;
  --cyan:     #5FD0E8;
  --red:      #E5624B;
  --green:    #56C596;

  --shell: 1180px;
  --r: 4px;

  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--text-light);
  background: var(--film);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.022em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.22rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: .7rem;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--amber); opacity: .75; flex: none;
}
.lede { font-size: 1.14rem; color: var(--text-light-dim); max-width: 62ch; }

/* ---------- sections ------------------------------------------------ */
.sec { padding: 84px 0; }
.sec--dark { background: var(--ink); color: var(--text-dark); }
.sec--dark .lede { color: var(--text-dim); }
.sec--panel { background: var(--film-2); }
.sec--tight { padding: 56px 0; }

.sec-head { max-width: 66ch; margin-bottom: 48px; }

/* ---------- buttons ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--f-display); font-weight: 600; font-size: .97rem;
  padding: .78rem 1.5rem; border-radius: var(--r);
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.btn--amber { background: var(--amber); color: #17120A; }
.btn--amber:hover { background: #FFBE55; transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-2); color: var(--text-dark); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn--dark { background: var(--ink); color: var(--text-dark); }
.btn--dark:hover { background: var(--panel); }
.btn--outline { border-color: rgba(16,26,34,.25); color: var(--text-light); }
.btn--outline:hover { border-color: var(--text-light); }

/* ---------- nav ----------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(7,11,16,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 28px; height: 66px; }
.nav__brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--text-dark); font-family: var(--f-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; }
.nav__brand small { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--amber); }
.nav__links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav__links a { color: var(--text-dim); text-decoration: none; font-size: .94rem; }
.nav__links a:hover { color: var(--text-dark); }
.nav__toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text-dark); border-radius: var(--r); padding: .4rem .6rem; margin-left: auto; cursor: pointer; }
@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line); padding: 8px 24px 18px;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: .6rem 0; width: 100%; }
  .nav__links .btn { margin-top: .6rem; }
}

/* ---------- hero: the viewbox --------------------------------------- */
.hero { background: var(--ink); color: var(--text-dark); padding: 78px 0 0; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(900px 420px at 78% 18%, rgba(240,169,59,.09), transparent 65%);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero h1 { max-width: 15ch; }
.hero p { color: var(--text-dim); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }

.hero__stats { display: flex; gap: 40px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero__stat b { display: block; font-family: var(--f-display); font-size: 1.7rem; letter-spacing: -.03em; }
.hero__stat span { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* the signature element: a DICOM viewer frame with corner overlays */
.viewbox {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--r);
  background: #000; aspect-ratio: 4 / 3; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.9), 0 0 0 6px rgba(255,255,255,.015);
}
.viewbox__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewbox__overlay {
  position: absolute; inset: 0; padding: 12px 14px;
  font-family: var(--f-mono); font-size: .66rem; line-height: 1.5;
  color: rgba(213,232,245,.82); text-shadow: 0 0 6px rgba(0,0,0,.9);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  pointer-events: none;
}
.viewbox__tl { grid-area: 1/1; }
.viewbox__tr { grid-area: 1/2; text-align: right; }
.viewbox__bl { grid-area: 2/1; align-self: end; }
.viewbox__br { grid-area: 2/2; text-align: right; align-self: end; }
.viewbox__overlay b { font-weight: 500; color: var(--amber); }

.viewbox__cross { position: absolute; inset: 0; pointer-events: none; opacity: .18; }
.viewbox__cross i { position: absolute; background: var(--cyan); }
.viewbox__cross i:first-child { left: 0; right: 0; top: 50%; height: 1px; }
.viewbox__cross i:last-child { top: 0; bottom: 0; left: 50%; width: 1px; }

.viewbox__scrub {
  position: absolute; right: 10px; top: 44px; bottom: 44px; width: 3px;
  background: rgba(95,208,232,.18); border-radius: 3px;
}
.viewbox__scrub i {
  position: absolute; left: -2px; width: 7px; height: 26px; border-radius: 3px;
  background: var(--cyan); box-shadow: 0 0 10px rgba(95,208,232,.6);
  animation: scrub 7s ease-in-out infinite;
}
@keyframes scrub { 0%,100% { top: 0; } 50% { top: calc(100% - 26px); } }

.viewbox__tag {
  position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  background: var(--amber); color: #17120A; font-family: var(--f-mono);
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .28rem .8rem; border-radius: var(--r) var(--r) 0 0;
}

/* ---------- ticker strip (live-ish system line) --------------------- */
.strip {
  background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--text-dim); font-family: var(--f-mono); font-size: .72rem;
  padding: 10px 0; margin-top: 72px; position: relative; z-index: 1;
}
.strip__in { display: flex; gap: 34px; flex-wrap: wrap; align-items: center; }
.strip__in span { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.dot--amber { background: var(--amber); }
.dot--cyan { background: var(--cyan); }

/* ---------- workflow: the ten-step wire ----------------------------- */
.wire { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.wire__step { background: var(--ink); padding: 24px 20px 26px; position: relative; }
.wire__n { font-family: var(--f-mono); font-size: .68rem; color: var(--amber); letter-spacing: .1em; }
.wire__t { font-family: var(--f-display); font-weight: 600; font-size: 1rem; margin: .55rem 0 .35rem; }
.wire__d { font-size: .88rem; color: var(--text-dim); margin: 0; line-height: 1.5; }

/* ---------- module cards -------------------------------------------- */
.mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1px; background: var(--film-3); border: 1px solid var(--film-3); }
.mod { background: var(--film-2); padding: 28px 26px 30px; transition: background .2s ease; }
.mod:hover { background: #FBFCFD; }
.mod__i { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(201,134,31,.35); border-radius: var(--r); color: var(--amber-dk); margin-bottom: 16px; }
.mod h3 { margin-bottom: .4rem; }
.mod p { font-size: .95rem; color: var(--text-light-dim); margin: 0; }

/* ---------- outcomes ------------------------------------------------ */
.outs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.out { border-left: 2px solid var(--amber); padding-left: 18px; }
.out h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.out p { font-size: .93rem; color: var(--text-dim); margin: 0; }

/* ---------- testimonials -------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.quote { background: var(--film-2); border: 1px solid var(--film-3); border-radius: var(--r); padding: 28px 26px; display: flex; flex-direction: column; }
.quote__mark { font-family: var(--f-display); font-size: 2.6rem; line-height: .6; color: var(--amber); margin-bottom: .5rem; }
.quote__text { font-size: 1.02rem; margin-bottom: 20px; }
.quote__who { margin-top: auto; font-family: var(--f-mono); font-size: .74rem; line-height: 1.7; color: var(--text-light-dim); letter-spacing: .01em; }
.quote__who b { display: block; font-family: var(--f-body); font-size: .98rem; font-weight: 600; color: var(--text-light); letter-spacing: 0; }

/* ---------- FAQ / AEO ----------------------------------------------- */
.faq { border-top: 1px solid var(--film-3); }
.faq__item { border-bottom: 1px solid var(--film-3); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--f-display); font-weight: 600; font-size: 1.07rem; color: var(--text-light);
  padding: 22px 42px 22px 0; position: relative;
}
.faq__q::after { content: '+'; position: absolute; right: 8px; top: 19px; font-size: 1.4rem; color: var(--amber-dk); font-weight: 400; }
.faq__item.open .faq__q::after { content: '–'; }
.faq__a { display: none; padding: 0 60px 24px 0; color: var(--text-light-dim); font-size: 1rem; }
.faq__item.open .faq__a { display: block; }

.answer-block {
  background: var(--film-2); border-left: 3px solid var(--amber);
  padding: 20px 24px; margin: 0 0 32px; border-radius: 0 var(--r) var(--r) 0;
}
.answer-block .lbl { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber-dk); display: block; margin-bottom: .5rem; }
.answer-block p { margin: 0; font-size: 1.05rem; }

.takeaways { background: var(--ink); color: var(--text-dark); padding: 26px 28px; border-radius: var(--r); margin: 34px 0; }
.takeaways h3 { font-size: .82rem; font-family: var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.takeaways ul { margin: 0; padding-left: 20px; }
.takeaways li { margin-bottom: .5rem; color: var(--text-dim); }

/* ---------- blog ---------------------------------------------------- */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 26px; }
.post-card { background: var(--film-2); border: 1px solid var(--film-3); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.post-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.post-card__meta { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-dk); margin-bottom: 12px; }
.post-card h3 { font-size: 1.16rem; margin-bottom: .55rem; }
.post-card p { font-size: .94rem; color: var(--text-light-dim); margin: 0 0 16px; }
.post-card__more { margin-top: auto; font-family: var(--f-mono); font-size: .74rem; color: var(--text-light-dim); }

.article { max-width: 74ch; margin: 0 auto; }
.article h2 { font-size: 1.55rem; margin-top: 2.1em; }
.article img { border-radius: var(--r); margin: 1.6em 0; }
.article blockquote { border-left: 3px solid var(--amber); margin: 1.6em 0; padding-left: 22px; color: var(--text-light-dim); font-size: 1.08rem; }
.article table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; }
.article th, .article td { border: 1px solid var(--film-3); padding: 10px 12px; text-align: left; }
.article th { background: var(--film); font-family: var(--f-display); }

.crumbs { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light-dim); margin-bottom: 26px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--amber-dk); }

/* ---------- forms --------------------------------------------------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field label { display: block; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .45rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .72rem .85rem; font-family: var(--f-body); font-size: 1rem;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text-dark);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--amber); outline-offset: 0; border-color: transparent; }
.field textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: .84rem; color: var(--text-dim); }

.notice { padding: 14px 18px; border-radius: var(--r); margin-bottom: 22px; font-size: .95rem; }
.notice--ok { background: rgba(86,197,150,.12); border: 1px solid rgba(86,197,150,.4); color: var(--green); }
.notice--err { background: rgba(229,98,75,.12); border: 1px solid rgba(229,98,75,.4); color: var(--red); }

/* ---------- geo ----------------------------------------------------- */
.geo-list { display: flex; flex-wrap: wrap; gap: 10px; }
.geo-list a {
  font-family: var(--f-mono); font-size: .78rem; text-decoration: none;
  border: 1px solid var(--line-2); color: var(--text-dim);
  padding: .45rem .9rem; border-radius: 100px;
}
.geo-list a:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- footer -------------------------------------------------- */
.foot { background: var(--ink); color: var(--text-dim); padding: 64px 0 30px; border-top: 1px solid var(--line); }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
.foot h4 { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.foot a { color: var(--text-dim); text-decoration: none; display: block; padding: .22rem 0; font-size: .94rem; }
.foot a:hover { color: var(--text-dark); }
.foot__bar { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-family: var(--f-mono); font-size: .72rem; }

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.badge-row span { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .08em; border: 1px solid var(--line-2); padding: .3rem .6rem; border-radius: var(--r); }

/* ---------- utility ------------------------------------------------- */
.mt0 { margin-top: 0; }
.center { text-align: center; }
.narrow { max-width: 780px; margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 200; background: var(--amber); color: #17120A; padding: .6rem 1rem; border-radius: var(--r); }
