/* =====================================================================
   HOMECARE — Components (M00 PART 01 foundation)
   Only the foundational primitives needed to render the design-system
   preview. The full reusable component library (buttons, form controls,
   cards, bottom nav, modal/dialog, toast, loading/empty/error) lands in
   PART 02 and PART 03. Keep this file light until then.
   ===================================================================== */

/* ---- App viewport (smartphone width, centered) ---- */
.hc-app {
  width: 100%;
  max-width: var(--hc-app-max-width);
  margin-inline: auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--hc-bg-app);
  padding: var(--hc-space-6) var(--hc-space-4);
  padding-top: max(var(--hc-space-6), env(safe-area-inset-top));
  padding-bottom: max(var(--hc-space-8), env(safe-area-inset-bottom));
}

/* ---- Layout helpers ---- */
.hc-stack {
  display: flex;
  flex-direction: column;
}
.hc-stack > * + * {
  margin-top: var(--hc-stack-gap, var(--hc-space-4));
}
.hc-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hc-space-2);
  align-items: center;
}
.hc-section {
  margin-top: var(--hc-space-8);
}
.hc-section__title {
  font-size: var(--hc-font-size-xs);
  font-weight: var(--hc-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hc-text-faint);
  margin-bottom: var(--hc-space-3);
}

/* ---- Surface (minimal panel primitive; full Card = PART 03) ---- */
.hc-surface {
  background: var(--hc-bg-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: var(--hc-space-4);
  box-shadow: var(--hc-shadow-sm);
}

/* ---- Brand wordmark (text) ---- */
.hc-wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--hc-space-2);
  font-weight: var(--hc-font-weight-bold);
  letter-spacing: var(--hc-letter-tight);
  color: var(--hc-color-primary-strong);
}
.hc-wordmark__name {
  font-size: var(--hc-font-size-lg);
  line-height: 1;
}

/* Shared platform identity; workspace identity is supplied by the shell. */
.hc-platform-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--hc-space-2);
  min-width: 0;
  color: var(--hc-color-primary-strong);
  text-decoration: none;
}
.hc-platform-brand__mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: var(--hc-radius-sm);
  background: var(--hc-color-accent);
  box-shadow: var(--hc-shadow-sm);
}
.hc-platform-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.05;
}
.hc-platform-brand__name {
  font-size: var(--hc-font-size-sm);
  font-weight: var(--hc-font-weight-bold);
  letter-spacing: 0.04em;
}
.hc-platform-brand__workspace {
  max-width: 8rem;
  overflow: hidden;
  color: var(--hc-text-muted);
  font-size: 0.625rem;
  font-weight: var(--hc-font-weight-semibold);
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.hc-wordmark__mark {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: var(--hc-radius-sm);
  background: var(--hc-color-accent);
  box-shadow: var(--hc-shadow-sm);
}

/* ---- Icon system (external SVG sprite via <use>) ---- */
.hc-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hc-icon--sm {
  width: 18px;
  height: 18px;
}
.hc-icon--lg {
  width: 28px;
  height: 28px;
}

/* ---- Iconography demo grid (design-system preview only) ---- */
.hc-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--hc-space-3);
  text-align: center;
}
.hc-icon-grid > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hc-space-2);
  color: var(--hc-color-primary);
}
.hc-icon-grid > li span {
  font-size: var(--hc-font-size-xs);
  color: var(--hc-text-muted);
}

/* ---- Token swatch (color palette preview only) ---- */
.hc-swatch {
  display: flex;
  align-items: center;
  gap: var(--hc-space-3);
  padding: var(--hc-space-2) var(--hc-space-3);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  background: var(--hc-bg-surface);
  font-size: var(--hc-font-size-sm);
}
.hc-swatch__chip {
  width: 28px;
  height: 28px;
  border-radius: var(--hc-radius-sm);
  border: 1px solid rgba(10, 35, 66, 0.1);
  flex: 0 0 auto;
}

/* ---- Type sample rows (preview only) ---- */
.hc-type-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--hc-space-3);
  padding: var(--hc-space-2) 0;
  border-bottom: 1px solid var(--hc-border);
}
.hc-type-row:last-child {
  border-bottom: 0;
}
.hc-type-row__meta {
  font-size: var(--hc-font-size-xs);
  color: var(--hc-text-faint);
}

/* ---- Radius demo chips (preview only) ---- */
.hc-radius-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--hc-border-strong);
  background: var(--hc-bg-subtle);
  color: var(--hc-text-muted);
  font-size: var(--hc-font-size-xs);
}

/* ---- Footer ---- */
.hc-foot {
  margin-top: var(--hc-space-12);
  text-align: center;
  color: var(--hc-text-faint);
  font-size: var(--hc-font-size-xs);
}
.hc-foot > * + * {
  margin-top: var(--hc-space-1);
}
