/* =============================================================================
   A-EMR — SITE CSS (public landing + gated placeholder)
   Aegis IT Advisors LLC

   Structural styles only. Every colour, size, space, radius and duration below
   is read from a semantic alias in tokens.css. A hex literal or a raw pixel
   colour value in this file is a defect — see tokens.css header.

   Layout dimensions not defined by the token system (page container widths)
   are plain values, chosen for a two-page marketing/placeholder surface,
   not the 1600px clinical work-surface grid tokens.css defines for the app.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: var(--line-body);
  min-height: 100vh;
}

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

a {
  color: var(--text-link);
}

.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex: none;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 480px) {
  .wrap {
    padding-inline: var(--space-4);
  }
}

/* -----------------------------------------------------------------------------
   FOCUS — :focus-visible only. Two-tone ring: 2px border-focus outer stroke,
   2px offset, plus a focus-halo layer so the ring reads on any surface.
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.skip-link:focus-visible {
  outline: var(--line-rule) solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-halo);
  border-radius: var(--radius-sm);
}

/* -----------------------------------------------------------------------------
   SKIP LINK
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-toast);
  transform: translateY(-200%);
  background: var(--surface-chrome);
  color: var(--text-on-chrome);
  font-weight: var(--weight-medium);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-standard);
}

.skip-link:focus-visible {
  transform: translateY(0);
  box-shadow: 0 0 0 4px var(--focus-halo);
}

/* -----------------------------------------------------------------------------
   DEMONSTRATION MARKER — persistent, non-dismissible, in normal document flow
   (not position:fixed) so it survives print and a screenshot taken at any
   scroll position without being clipped by a print page break.
   -------------------------------------------------------------------------- */
.demo-marker {
  background: var(--surface-chrome);
  color: var(--text-on-chrome);
  border-bottom: var(--line-hairline) solid var(--color-navy-800);
}

.demo-marker .wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-2);
  font-size: var(--size-caption);
  line-height: var(--line-caption);
  font-weight: var(--weight-medium);
  max-width: none;
}

.demo-marker .icon {
  color: var(--text-on-chrome-muted);
}

/* -----------------------------------------------------------------------------
   SITE HEADER
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--surface-chrome);
  color: var(--text-on-chrome);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--size-heading);
  line-height: var(--line-heading);
  font-weight: var(--weight-semibold);
  color: var(--text-on-chrome);
  text-decoration: none;
  letter-spacing: var(--tracking-tight);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-on-chrome-muted);
  font-size: var(--size-body);
  text-decoration: none;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--text-on-chrome);
}

/* -----------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding-inline: var(--control-pad-x);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border: var(--line-hairline) solid transparent;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard);
}

.btn-primary {
  background: var(--accent-base);
  color: var(--text-on-accent);
}

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

.btn-primary:active {
  background: var(--accent-active);
}

.btn-primary .icon {
  color: var(--text-on-accent);
}

.btn-secondary {
  background: var(--surface-raised);
  color: var(--text-primary);
  border-color: var(--border-control);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

/* -----------------------------------------------------------------------------
   PILL / BADGE — always carries a word (ui-direction §7). Micro size is the
   one permitted uppercase use.
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--size-micro);
  line-height: var(--line-micro);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  white-space: nowrap;
}

.pill-neutral {
  background: var(--surface-sunken);
  color: var(--text-secondary);
  border: var(--line-hairline) solid var(--border-default);
}

/* -----------------------------------------------------------------------------
   TYPE
   -------------------------------------------------------------------------- */
.eyebrow {
  font-size: var(--size-micro);
  line-height: var(--line-micro);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}

h1 {
  font-family: var(--font-display);
  font-size: var(--size-display);
  line-height: var(--line-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
}

h2 {
  font-size: var(--size-title);
  line-height: var(--line-title);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
}

h3 {
  font-size: var(--size-heading);
  line-height: var(--line-heading);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

.lede {
  font-size: var(--size-body-lg);
  line-height: var(--line-body-lg);
  color: var(--text-secondary);
  max-width: var(--measure-prose);
  margin: 0 0 var(--space-6);
}

p {
  max-width: var(--measure-prose);
}

.status-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--size-body);
  max-width: var(--measure-prose);
  margin: 0 0 var(--space-8);
}

.status-line .pill {
  flex: none;
}

/* -----------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  padding-block: var(--space-16) var(--space-12);
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.cta-note {
  color: var(--text-muted);
  font-size: var(--size-caption);
  line-height: var(--line-caption);
  margin: 0;
}

/* -----------------------------------------------------------------------------
   ABOUT / SECTIONS
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--space-12);
  border-top: var(--line-hairline) solid var(--border-subtle);
}

.section p {
  color: var(--text-secondary);
}

/* -----------------------------------------------------------------------------
   MODULE GRID — the four module groups, rendered as real interface panels
   rather than a bulleted list.
   -------------------------------------------------------------------------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.module-panel {
  background: var(--surface-raised);
  border: var(--line-hairline) solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--panel-pad);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.module-panel .icon-chip {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-panel .icon-chip .icon {
  width: 22px;
  height: 22px;
}

.module-panel h3 {
  margin: 0;
}

.module-panel .module-scope {
  color: var(--text-secondary);
  font-size: var(--size-body);
  line-height: var(--line-body);
  margin: 0;
  flex: 1 0 auto;
  max-width: none;
}

.module-panel .pill {
  align-self: flex-start;
}

/* -----------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: var(--line-hairline) solid var(--border-subtle);
  padding-block: var(--space-8);
  margin-top: var(--space-12);
}

.site-footer p {
  color: var(--text-muted);
  font-size: var(--size-caption);
  line-height: var(--line-caption);
  margin: 0;
}

.site-footer a {
  color: var(--text-link);
}

.ext-link-note {
  /* visually hidden helper text announcing an external destination */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -----------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .hero {
    padding-block: var(--space-10) var(--space-8);
  }

  h1 {
    font-size: var(--size-title);
    line-height: var(--line-title);
  }
}
