/* ==========================================================================
   HatchMed Brand CSS
   Extracted from live hatchmed.com — February 2026
   Standalone file for AI-built mini-pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Google Fonts
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700;800&display=swap');

/* --------------------------------------------------------------------------
   2. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --hm-primary: #6EC1E4;
  --hm-primary-hover: #5AB0D3;
  --hm-primary-light: #9AC3E2;
  --hm-teal: #009AA7;
  --hm-teal-hover: #007F8A;
  --hm-dark: #101010;
  --hm-text: #363636;
  --hm-text-dark: #0a0a0a;
  --hm-white: #FFFFFF;
  --hm-gray-light: #E0E0E0;
  --hm-gray-medium: #CCCCCC;
  --hm-gray-bg: #F5F5F5;
  --hm-border: #cccccc;
  --hm-error: #D32F2F;
  --hm-success: #2E7D32;

  /* Typography */
  --hm-font: 'Raleway', sans-serif;
  --hm-text-base: 16px;
  --hm-text-sm: 14px;
  --hm-text-xs: 12px;
  --hm-text-lg: 18px;

  /* Heading sizes (from live site) */
  --hm-h1: 46px;
  --hm-h2: 36px;
  --hm-h3: 28px;
  --hm-h4: 20px;
  --hm-h5: 18px;
  --hm-h6: 16px;

  /* Spacing scale */
  --hm-sp-xs: 0.5rem;
  --hm-sp-sm: 0.75rem;
  --hm-sp-md: 1rem;
  --hm-sp-lg: 1.5rem;
  --hm-sp-xl: 2rem;
  --hm-sp-2xl: 3rem;
  --hm-sp-3xl: 4rem;

  /* Layout */
  --hm-container: 1200px;
  --hm-container-narrow: 800px;
  --hm-radius-sm: 4px;
  --hm-radius-md: 8px;
  --hm-radius-lg: 16px;
  --hm-radius-pill: 9999px;
  --hm-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --hm-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --hm-transition: 0.3s ease;
}

/* --------------------------------------------------------------------------
   3. Base Reset & Body
   -------------------------------------------------------------------------- */
.hm-brand {
  box-sizing: border-box;
  font-family: var(--hm-font);
  font-size: var(--hm-text-base);
  color: var(--hm-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hm-brand *,
.hm-brand *::before,
.hm-brand *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hm-brand img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
.hm-brand h1,
.hm-brand h2,
.hm-brand h3,
.hm-brand h4,
.hm-brand h5,
.hm-brand h6 {
  color: var(--hm-text-dark);
  line-height: 1.2;
  margin-bottom: var(--hm-sp-md);
}

.hm-brand h1 {
  font-size: var(--hm-h1);
  font-weight: 700;
  line-height: 56px;
}

.hm-brand h2 {
  font-size: var(--hm-h2);
  font-weight: 400;
  line-height: 40px;
}

.hm-brand h3 {
  font-size: var(--hm-h3);
  font-weight: 600;
  line-height: 32px;
}

.hm-brand h4 {
  font-size: var(--hm-h4);
  font-weight: 700;
  line-height: 28px;
}

.hm-brand h5 {
  font-size: var(--hm-h5);
  font-weight: 700;
  line-height: 24px;
}

.hm-brand h6 {
  font-size: var(--hm-h6);
  font-weight: 700;
  line-height: 20px;
}

.hm-brand p {
  margin-bottom: var(--hm-sp-md);
}

.hm-brand a {
  color: var(--hm-primary);
  text-decoration: none;
  transition: color var(--hm-transition);
}

.hm-brand a:hover {
  color: var(--hm-primary-hover);
  text-decoration: underline;
}

.hm-brand .hm-subtitle {
  font-size: var(--hm-text-lg);
  font-weight: 300;
  color: var(--hm-text);
  margin-bottom: var(--hm-sp-lg);
}

/* --------------------------------------------------------------------------
   5. Layout Containers
   -------------------------------------------------------------------------- */
.hm-container {
  width: 100%;
  max-width: var(--hm-container);
  margin: 0 auto;
  padding: 0 var(--hm-sp-lg);
}

.hm-container--narrow {
  max-width: var(--hm-container-narrow);
}

.hm-section {
  padding: var(--hm-sp-3xl) 0;
}

.hm-section--gray {
  background-color: var(--hm-gray-bg);
}

.hm-section--dark {
  background-color: var(--hm-dark);
  color: var(--hm-gray-light);
}

.hm-section--dark h1,
.hm-section--dark h2,
.hm-section--dark h3,
.hm-section--dark h4 {
  color: var(--hm-white);
}

.hm-divider {
  border: none;
  border-top: 1px solid var(--hm-gray-light);
  margin: var(--hm-sp-xl) 0;
}

/* --------------------------------------------------------------------------
   6. Grid System
   -------------------------------------------------------------------------- */
.hm-grid {
  display: grid;
  gap: var(--hm-sp-lg);
}

.hm-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.hm-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.hm-grid--4col {
  grid-template-columns: repeat(4, 1fr);
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.hm-btn {
  display: inline-block;
  font-family: var(--hm-font);
  font-weight: 600;
  font-size: 1.125em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--hm-radius-pill);
  padding: calc(0.667em + 2px) calc(1.333em + 2px);
  transition: all var(--hm-transition);
  line-height: 1.4;
}

.hm-btn--primary {
  background-color: var(--hm-primary);
  color: var(--hm-white);
  border-color: var(--hm-primary);
}

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

.hm-btn--secondary {
  background-color: transparent;
  color: var(--hm-primary);
  border-color: var(--hm-primary);
}

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

.hm-btn--teal {
  background-color: var(--hm-teal);
  color: var(--hm-white);
  border-color: var(--hm-teal);
}

.hm-btn--teal:hover {
  background-color: var(--hm-teal-hover);
  border-color: var(--hm-teal-hover);
  color: var(--hm-white);
  text-decoration: none;
}

.hm-btn--sm {
  font-size: var(--hm-text-sm);
  padding: 0.5em 1.2em;
  border-radius: var(--hm-radius-sm);
}

.hm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   8. Form Elements
   -------------------------------------------------------------------------- */
.hm-form {
  width: 100%;
  padding: var(--hm-sp-lg);
}

.hm-form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.hm-form-row label {
  width: 30%;
  margin-right: 10px;
  margin-top: 5px;
  font-weight: 600;
  font-size: var(--hm-text-base);
  word-break: break-word;
}

.hm-form-row input[type="text"],
.hm-form-row input[type="email"],
.hm-form-row input[type="tel"],
.hm-form-row select,
.hm-form-row textarea {
  width: 60%;
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius-sm);
  padding: 8px 12px;
  font-family: var(--hm-font);
  font-size: var(--hm-text-base);
  color: var(--hm-text);
  transition: border-color var(--hm-transition);
  background: var(--hm-white);
}

.hm-form-row input:focus,
.hm-form-row select:focus,
.hm-form-row textarea:focus {
  outline: none;
  border-color: var(--hm-primary);
  box-shadow: 0 0 0 2px rgba(110, 193, 228, 0.2);
}

.hm-form-row textarea {
  resize: vertical;
  min-height: 100px;
}

.hm-form-help {
  font-size: var(--hm-text-xs);
  color: var(--hm-gray-medium);
  margin-left: 7px;
  max-width: 35%;
}

.hm-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--hm-sp-lg);
  padding-right: 10%;
}

/* --------------------------------------------------------------------------
   9. Cards & Tiles
   -------------------------------------------------------------------------- */
.hm-card {
  background: var(--hm-white);
  border-radius: var(--hm-radius-md);
  box-shadow: var(--hm-shadow);
  padding: var(--hm-sp-lg);
  transition: all var(--hm-transition);
}

.hm-card:hover {
  box-shadow: var(--hm-shadow-hover);
  transform: translateY(-2px);
}

/* Tile grid: cap tile width, auto-fill rows */
.hm-grid--tiles {
  grid-template-columns: repeat(auto-fill, minmax(216px, 270px));
}

/* Selectable tile card for the HallMonitor selector */
.hm-tile {
  display: block;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(
    140deg,
    rgba(var(--tile-rgb, 96,125,139), 0.6) 0%,
    rgb(var(--tile-rgb, 96,125,139)) 100%
  );
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.hm-tile:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.hm-tile:active {
  transform: scale(0.96) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.hm-tile input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.hm-tile__face {
  background: none;
  border-radius: 18px;
  padding: 14px 20px 14px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  height: 90px;
  border: 3px solid transparent;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.hm-tile--selected .hm-tile__face {
  border-color: #4DA3FF;
  box-shadow: inset 0 0 0 1px rgba(77, 163, 255, 0.4), 0 0 0 2px rgba(77, 163, 255, 0.3);
}

/* Checkmark indicator - corner badge, hidden by default */
.hm-tile__check {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: #4DA3FF;
  border-radius: 0 15px 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(10px, -10px);
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.hm-tile__check svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.hm-tile--selected .hm-tile__check {
  opacity: 1;
  transform: translate(0, 0);
}

.hm-tile--selected .hm-tile__check svg {
  fill: white;
}

/* Icon: enlarged for bold filled style */
.hm-tile__icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hm-white);
}

.hm-tile__icon svg {
  width: 62px;
  height: 62px;
  fill: currentColor;
  stroke: none;
}

/* Text: Nunito (closest to SF Pro Rounded), bold */
.hm-tile__label {
  font-family: 'Nunito', -apple-system, system-ui, sans-serif;
  font-weight: 800;
  font-size: 25px;
  color: var(--hm-white);
  line-height: 1.2;
  text-shadow: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Category heading for tile groups */
.hm-category {
  font-size: var(--hm-h4);
  font-weight: 700;
  color: var(--hm-text-dark);
  border-bottom: 3px solid var(--hm-primary);
  border-radius: 3px;
  padding-bottom: var(--hm-sp-xs);
  margin-bottom: var(--hm-sp-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hm-category__actions {
  font-size: var(--hm-text-xs);
  font-weight: 600;
  display: flex;
  gap: 0.5rem;
}

.hm-category__actions a {
  cursor: pointer;
  color: var(--hm-primary);
  border: 1.5px solid var(--hm-primary);
  border-radius: var(--hm-radius-pill);
  padding: 0.2em 0.75em;
  transition: all var(--hm-transition);
  text-decoration: none;
  white-space: nowrap;
}

.hm-category__actions a:hover {
  background: var(--hm-primary);
  color: var(--hm-white);
  text-decoration: none;
}

.hm-category__actions a.hm-active {
  background: var(--hm-primary);
  color: var(--hm-white);
}

.hm-category-group {
  margin-bottom: var(--hm-sp-2xl);
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.hm-footer {
  background: var(--hm-dark);
  color: var(--hm-gray-light);
  padding: var(--hm-sp-2xl) 0 var(--hm-sp-lg);
}

.hm-footer h3,
.hm-footer h4 {
  color: var(--hm-white);
}

.hm-footer a {
  color: var(--hm-gray-light);
}

.hm-footer a:hover {
  color: var(--hm-primary);
}

.hm-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--hm-sp-xl);
  padding-top: var(--hm-sp-lg);
  font-size: var(--hm-text-sm);
  text-align: center;
}

/* --------------------------------------------------------------------------
   11. Utility Classes
   -------------------------------------------------------------------------- */
.hm-text-center { text-align: center; }
.hm-text-left { text-align: left; }
.hm-text-right { text-align: right; }

.hm-text-primary { color: var(--hm-primary); }
.hm-text-teal { color: var(--hm-teal); }
.hm-text-dark { color: var(--hm-text-dark); }
.hm-text-light { color: var(--hm-gray-light); }
.hm-text-white { color: var(--hm-white); }

.hm-bg-primary { background-color: var(--hm-primary); }
.hm-bg-dark { background-color: var(--hm-dark); }
.hm-bg-gray { background-color: var(--hm-gray-bg); }
.hm-bg-white { background-color: var(--hm-white); }

.hm-mt-xs { margin-top: var(--hm-sp-xs); }
.hm-mt-sm { margin-top: var(--hm-sp-sm); }
.hm-mt-md { margin-top: var(--hm-sp-md); }
.hm-mt-lg { margin-top: var(--hm-sp-lg); }
.hm-mt-xl { margin-top: var(--hm-sp-xl); }

.hm-mb-xs { margin-bottom: var(--hm-sp-xs); }
.hm-mb-sm { margin-bottom: var(--hm-sp-sm); }
.hm-mb-md { margin-bottom: var(--hm-sp-md); }
.hm-mb-lg { margin-bottom: var(--hm-sp-lg); }
.hm-mb-xl { margin-bottom: var(--hm-sp-xl); }

.hm-py-sm { padding-top: var(--hm-sp-sm); padding-bottom: var(--hm-sp-sm); }
.hm-py-md { padding-top: var(--hm-sp-md); padding-bottom: var(--hm-sp-md); }
.hm-py-lg { padding-top: var(--hm-sp-lg); padding-bottom: var(--hm-sp-lg); }

.hm-hidden { display: none; }

.hm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hm-grid--4col {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hm-brand h1 { font-size: 36px; line-height: 44px; }
  .hm-brand h2 { font-size: 28px; line-height: 34px; }
  .hm-brand h3 { font-size: 24px; line-height: 28px; }

  .hm-grid--2col { grid-template-columns: 1fr; }
  .hm-grid--3col { grid-template-columns: repeat(2, 1fr); }
  .hm-grid--4col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hm-form-row {
    flex-direction: column;
  }

  .hm-form-row label {
    width: 100%;
    margin-right: 0;
    margin-bottom: 4px;
  }

  .hm-form-row input[type="text"],
  .hm-form-row input[type="email"],
  .hm-form-row input[type="tel"],
  .hm-form-row select,
  .hm-form-row textarea {
    width: 100%;
  }

  .hm-form-help {
    margin-left: 0;
    max-width: 100%;
    margin-top: 4px;
  }

  .hm-form-actions {
    padding-right: 0;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hm-brand h1 { font-size: 30px; line-height: 38px; }
  .hm-brand h2 { font-size: 24px; line-height: 30px; }

  .hm-grid--3col { grid-template-columns: 1fr; }
  .hm-grid--4col { grid-template-columns: repeat(2, 1fr); }

  .hm-btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .hm-container {
    padding: 0 var(--hm-sp-md);
  }

  .hm-section {
    padding: var(--hm-sp-xl) 0;
  }
}
