/* CareScot marketing site — v3
   Visual system mirrors the product (care-scot/src/app/globals.css): the
   "Clinical teal" palette, warm neutrals, Atkinson Hyperlegible Next, tight
   radii, and the semantic status tokens. If the product theme changes, update
   the tokens below to match. The hero and "at a glance" sections mock the real
   dashboard because the best way to sell admin software is to show the admin
   screen, not an abstract illustration of one. */

:root {
  --background: #f6f5f1;
  --foreground: #1c2321;
  --muted-foreground: #545b57;
  --muted: #eeece6;
  --border: #dddad2;
  --input: #8a8f8b;
  --sidebar: #eeece6;
  --card: #ffffff;
  --primary: #0e5e5b;
  --primary-rgb: 14, 94, 91;
  --primary-hover: #0a4a48;
  --primary-foreground: #ffffff;
  --accent: #e3e0d8;
  --ring: #0e5e5b;
  --shadow-rgb: 28, 35, 33;

  --good: #1d5e36;
  --good-bg: #eaf4ee;
  --warn: #7a4200;
  --warn-bg: #fdf2e3;
  --critical: #9b1c22;
  --critical-bg: #fbeaea;

  --data-1: #0e5e5b;   /* product chart-1 */
  --cta-muted: #cfe3e1;

  --font-sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 10px;

  --measure: 42rem;
  --wrap: 72rem;
}

/* Mirrors the product's .dark theme; follows the visitor's OS setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121716;
    --foreground: #eceeec;
    --muted-foreground: #a9b1ad;
    --muted: #252c2a;
    --border: rgba(255, 255, 255, 0.1);
    --input: #6f7773;
    --sidebar: #161c1b;
    --card: #1a201f;
    --primary: #5fb8b2;
    --primary-rgb: 95, 184, 178;
    --primary-hover: #7ccac4;
    --primary-foreground: #0b1f1e;
    --accent: #2c3432;
    --ring: #5fb8b2;
    --shadow-rgb: 0, 0, 0;

    --good: #8fd3a8;
    --good-bg: #16301f;
    --warn: #f2c27a;
    --warn-bg: #33240e;
    --critical: #f4a3a3;
    --critical-bg: #3a1618;

    --data-1: #5fb8b2;
    --cta-muted: #1f3f3d;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--foreground);
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.lede {
  font-size: 1.15rem;
  color: var(--muted-foreground);
  max-width: var(--measure);
}

.section-lede {
  color: var(--muted-foreground);
  max-width: var(--measure);
  margin-top: -0.4em;
}

.icon {
  flex-shrink: 0;
}

/* ─── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.6em 1.2em;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-ghost:hover {
  background: var(--accent);
  text-decoration: none;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ─── Header ───────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--foreground);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
}

.brand-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  line-height: 1.1;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: 0.5rem;
  flex: 1;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--foreground);
  text-decoration: none;
}

.main-nav a.current {
  color: var(--foreground);
}

/* ─── Hero ─────────────────────────────────────────────────────────── */

.hero {
  padding: 3.5rem 0 4rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.1rem;
}

.eyebrow-tag .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--good);
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1.3rem;
}

.trust-line {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  max-width: 28rem;
}

/* ─── App frame (the dashboard mock) ──────────────────────────────── */

.app-frame {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.04), 0 20px 48px -16px rgba(var(--shadow-rgb), 0.18);
  overflow: hidden;
  display: flex;
  font-size: 0.85rem;
}

.app-sidebar {
  width: 11rem;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  padding: 0.9rem 0.7rem;
  display: none;
}

@media (min-width: 640px) {
  .app-sidebar {
    display: block;
  }
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.4rem 0.9rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.app-brand .brand-mark {
  height: 1.6rem;
  width: 1.6rem;
  font-size: 0.65rem;
  border-radius: var(--radius-sm);
}

.app-brand-name {
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.1;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.app-nav-item.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.6rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.app-content {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-content h2 {
  font-size: 1.05rem;
  margin-bottom: 0.1rem;
}

.app-content .muted {
  font-size: 0.8rem;
  margin: 0;
}

/* stat tiles */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.stat-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.7rem 0.8rem;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin: 0 0 0.25rem;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-delta {
  font-size: 0.72rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

.stat-delta.is-good { color: var(--good); }
.stat-delta.is-neutral { color: var(--muted-foreground); }

/* mini module cards inside the mock */

.mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mini-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.7rem;
}

.mini-card .icon-box {
  height: 1.6rem;
  width: 1.6rem;
  border-radius: var(--radius-sm);
}

.mini-card .icon-box svg {
  width: 0.85rem;
  height: 0.85rem;
}

.mini-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0.5rem 0 0.15rem;
}

.mini-card-stat {
  font-size: 0.72rem;
  font-weight: 500;
}

.mini-card-stat.is-good { color: var(--good); }
.mini-card-stat.is-warn { color: var(--warn); }

/* chart widget card inside the mock */

.chart-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.8rem 0.9rem 0.6rem;
}

.chart-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

/* ─── Chart primitives (inline SVG) ───────────────────────────────── */

.chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-svg .bar {
  fill: var(--data-1);
  opacity: 0.38;
  transition: opacity 0.15s ease;
}

.chart-svg .bar.is-current {
  opacity: 1;
}

.chart-svg .bar:hover {
  opacity: 0.75;
}

.chart-svg .bar.is-current:hover {
  opacity: 1;
}

.chart-svg .axis-label {
  fill: var(--muted-foreground);
  font-size: 8.5px;
  font-family: var(--font-sans);
}

.chart-svg .value-label {
  fill: var(--foreground);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-sans);
}

.chart-svg .baseline,
.chart-svg .gridline {
  stroke: var(--border);
  stroke-width: 1;
}

.chart-svg .line-path {
  stroke: var(--data-1);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-svg .area-path {
  fill: var(--data-1);
  opacity: 0.1;
}

.chart-svg .end-dot {
  fill: var(--data-1);
  stroke: var(--card);
  stroke-width: 2;
}

/* ─── Icon box (shared with real module cards) ────────────────────── */

.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  flex-shrink: 0;
}

.icon-box svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ─── Credibility band ─────────────────────────────────────────────── */

.band {
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.2rem 0;
}

.band-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .band-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.band-grid p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--foreground);
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

/* ─── At-a-glance charts section ──────────────────────────────────── */

.glance {
  padding: 4rem 0;
}

.glance-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .glance-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
  }
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.1rem;
}

.panel-sub {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  margin: 0 0 1.1rem;
}

/* status legend (training status chart) */

.status-bar-track {
  display: flex;
  width: 100%;
  height: 1.1rem;
  gap: 2px;
}

.status-bar-seg {
  height: 100%;
}

.status-bar-seg:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.status-bar-seg:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 1rem;
}

.status-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.status-legend-item svg {
  width: 1rem;
  height: 1rem;
}

.status-legend-item.is-good svg { color: var(--good); }
.status-legend-item.is-warn svg { color: var(--warn); }
.status-legend-item.is-critical svg { color: var(--critical); }

.status-legend-count {
  color: var(--muted-foreground);
}

/* ─── Modules / feature cards ──────────────────────────────────────── */

.modules, .steps, .security, .cta-band, .plans, .faq, .contact {
  padding: 4rem 0;
}

.module-groups {
  display: grid;
  gap: 1.2rem;
  margin-top: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .module-groups {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  background: var(--card);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.feature-card:hover {
  box-shadow: 0 2px 10px rgba(var(--shadow-rgb), 0.06);
  border-color: var(--ring);
}

.feature-card .icon-box {
  margin-bottom: 0.9rem;
}

.feature-card h3 {
  margin-bottom: 0.3rem;
}

.feature-card dl {
  margin: 0.9rem 0 0;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

.feature-card .row {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-card .row:last-child {
  border-bottom: none;
}

.feature-card .row dt {
  font-weight: 600;
  font-size: 0.88rem;
}

.feature-card .row dd {
  margin: 0.1rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

/* ─── Steps ────────────────────────────────────────────────────────── */

.step-list {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.6rem;
}

@media (min-width: 760px) {
  .step-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
  }
}

.step-no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.step-list h3 {
  margin-bottom: 0.3rem;
}

.step-list p {
  color: var(--muted-foreground);
  margin: 0;
  font-size: 0.9rem;
}

/* ─── CTA band ─────────────────────────────────────────────────────── */

.cta-band {
  background: var(--primary);
  color: var(--primary-foreground);
}

.cta-band .btn-primary {
  border-color: var(--primary-foreground);
}

.cta-inner {
  text-align: left;
  max-width: 38rem;
}

.cta-band h2, .cta-band p {
  color: var(--primary-foreground);
}

.cta-band p {
  color: var(--cta-muted);
}

.cta-band .btn-primary {
  background: var(--primary-foreground);
  color: var(--primary);
}

.cta-band .btn-primary:hover {
  background: var(--accent);
}

/* ─── Security section ─────────────────────────────────────────────── */

.security-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Pricing plans ────────────────────────────────────────────────── */

.plan-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 2.2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
}

.plan.is-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.plan-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.plan-for {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}

.plan-price {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.1rem;
}

.plan-price span {
  font-size: 0.88rem;
  color: var(--muted-foreground);
  font-weight: 400;
}

.plan-note {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  margin-bottom: 1.3rem;
}

.plan-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  flex: 1;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.plan-features li {
  padding: 0.4rem 0;
  font-size: 0.88rem;
  padding-left: 1.3rem;
  position: relative;
  color: var(--foreground);
}

.plan-features li svg {
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--good);
}

/* ─── FAQ ──────────────────────────────────────────────────────────── */

.faq-list {
  margin-top: 1.5rem;
  max-width: 44rem;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 0.95rem 0;
}

.faq-list summary {
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.faq-list p {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  margin: 0.7rem 0 0;
  max-width: 38rem;
}

/* ─── Contact / demo form ──────────────────────────────────────────── */

.contact {
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  gap: 2.3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--input);
  background: var(--card);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--foreground);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.field-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Footer ───────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.6rem 0 1.6rem;
  background: var(--background);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 1.6rem;
}

.footer-nav {
  display: flex;
  gap: 1.3rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

.footer-nav a:hover {
  color: var(--foreground);
}

.fine-print {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  margin: 0;
}

/* ─── Placeholder pricing ──────────────────────────────────────────── */

.plan-price.is-placeholder {
  color: var(--muted-foreground);
}

/* ─── Form feedback ────────────────────────────────────────────────── */

.form-note {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  margin: 0.9rem 0 0;
}
