/* ==========================================================================
   LilacHealth marketing site — design system + layout
   ========================================================================== */

:root {
  /* Brand palette */
  --color-primary: #f8c2da;        /* soft lilac/pink — accents */
  --color-primary-dark: #e79cc0;   /* hover/active state for primary */
  --color-plum: #5b2a6e;           /* deep plum from logo — headings, CTA text on light bg */
  --color-lavender: #b36fa6;       /* mid lilac from logo — secondary accent */
  --color-lavender-tint: #fbeaf2;  /* very light lilac — used sparingly (chip borders etc.) */
  --color-text: #3a2540;           /* near-black plum — body text, meets AA on white/tint */
  --color-text-muted: #6b5570;
  --color-white: #ffffff;
  --color-border: #edd6e4;

  /* Header/footer — "pixelated" (hard-edged, banded) gradient from #e5e7eb to olive green,
     per explicit request. 12 discrete color steps instead of a smooth blend. */
  --gradient-header-footer: linear-gradient(
    90deg,
    #e5e7eb 0%, #e5e7eb 8.33%,
    #dce1da 8.33%, #dce1da 16.67%,
    #d3dbca 16.67%, #d3dbca 25%,
    #cad4b9 25%, #cad4b9 33.33%,
    #c1cea8 33.33%, #c1cea8 41.67%,
    #b8c897 41.67%, #b8c897 50%,
    #afc287 50%, #afc287 58.33%,
    #a6bc76 58.33%, #a6bc76 66.67%,
    #9db665 66.67%, #9db665 75%,
    #94af54 75%, #94af54 83.33%,
    #8ba944 83.33%, #8ba944 91.67%,
    #82a333 91.67%, #82a333 100%
  );

  /* News sidebar (per explicit request) */
  --color-news-panel-bg: #462d86;
  --color-news-panel-text: #f1eaff;
  --color-news-panel-text-muted: #c9b8f0;
  --color-news-panel-border: rgba(255, 255, 255, 0.16);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container-width: 1140px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(91, 42, 110, 0.12);

  /* Rendered height of the taller .site-header (bigger logo + vertical padding + border),
     used to offset the sticky news panel so it clears the sticky header. */
  --header-offset: 112px;
  --page-max-width: 1452px; /* --container-width (1140) + sidebar (280) + gap (32) */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* bg.png behind the whole page, darkened with a plum-tinted overlay per explicit request. */
body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: #e5e7eb;
  background-image: url("../assets/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.6;
}

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

a {
  color: var(--color-plum);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

h1, h2, h3 {
  color: var(--color-plum);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-2); }

.accent {
  color: var(--color-lavender);
}

/* Pink header band capping the top of the main card, per explicit request — used on the
   "How It Works" and "Services" pages (the only two with a .section-header). */
/* Banner color matches the News and Updates sidebar, per explicit request. */
.section-header {
  text-align: center;
  background: var(--color-news-panel-bg);
  margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius) var(--radius) 0 0;
}

.section-header h2,
.section-header p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  color: var(--color-white);
}

.section-header p {
  color: rgba(255, 255, 255, 0.85);
}

.section-header .eyebrow--muted {
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-plum);
}

.eyebrow {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-plum);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

.eyebrow--muted {
  background: var(--color-lavender-tint);
  color: var(--color-lavender);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--primary {
  background: var(--color-plum);
  color: var(--color-white);
  box-shadow: var(--shadow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(91, 42, 110, 0.2);
}

.btn--ghost {
  color: var(--color-plum);
  font-weight: 600;
}

/* Header / Nav — green-to-olive gradient per explicit request, white text/nav for contrast */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--gradient-header-footer);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-plum);
}

.brand img {
  height: 64px;
  width: 64px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-plum);
  font-weight: 600;
}

.site-nav a:hover {
  opacity: 0.85;
}

/* Page layout — sidebar + main content */
.page-layout {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.page-layout > main {
  min-width: 0; /* let long content shrink inside the grid track instead of overflowing */
}

/* News panel — deep purple per explicit request */
.news-panel {
  position: sticky;
  top: calc(var(--header-offset) + var(--space-2));
  max-height: calc(100vh - var(--header-offset) - var(--space-4));
  overflow-y: auto;
  background: var(--color-news-panel-bg);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow);
  margin-top: var(--space-5);
  color: var(--color-news-panel-text);
}

.news-panel__title {
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
  color: var(--color-white);
}

.news-panel__item {
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-news-panel-border);
}

.news-panel__item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.news-panel__date {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.news-panel__item-title {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
  color: var(--color-white);
}

.news-panel__blurb {
  font-size: 0.85rem;
  color: var(--color-news-panel-text-muted);
  margin: 0;
}

.news-panel__empty {
  font-size: 0.9rem;
  color: var(--color-news-panel-text-muted);
  margin: 0;
}

/* Health quotes marquee */
.quotes-banner {
  overflow: hidden;
  background: var(--color-lavender-tint);
  border-radius: var(--radius);
  padding: var(--space-2) 0;
  margin: var(--space-4) 0;
}

.quotes-track {
  display: flex;
  width: max-content;
  animation: scroll-quotes 60s linear infinite;
}

.quotes-track__item {
  flex-shrink: 0;
  padding: 0 var(--space-5);
  color: var(--color-plum);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

@keyframes scroll-quotes {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .quotes-track {
    animation: none;
  }
}

/* ── Main card system ──────────────────────────────────────────────────────
   Every page (Home / How It Works / Services / Why LilacHealth) is built from
   the same three blocks inside <main>: one page-specific .main-card, the
   quotes marquee, and a shared .main-card--download "Get the App" card. Page
   background is plain white to match the card's own background exactly. */
.main-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}

.main-card--hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

.hero-copy p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.hero-image img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
}

/* About (Why LilacHealth page) */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-5);
  align-items: center;
}

.about-photo {
  position: relative;
}

.about-photo img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
}

.about-photo__badge {
  position: absolute;
  top: -14px;
  left: -14px;
  z-index: 1;
  background: var(--color-lavender);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.about-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.about-point {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-plum);
}

.about-point__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-lavender-tint);
  font-size: 1rem;
}

/* Stats row (Why LilacHealth page, inside the same main card) */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.trust-card {
  text-align: center;
  padding: var(--space-2);
}

.trust-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-2);
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* How It Works page */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.step-card {
  text-align: center;
  padding: var(--space-3);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-plum);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

/* Services page */

/* Two-in-one "paired card": each pair (General/Pediatrics, Physiotherapy/Dietician) renders as
   ONE continuous card spanning the full content width (matching the chip groups below it),
   with a floral glyph marking the divide between the two halves — per explicit request,
   colored to match the Hero's "Trusted Home Healthcare" eyebrow pill (var(--color-primary)). */
.paired-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  text-align: center;
}

.paired-card__half h3,
.paired-card__half p {
  color: var(--color-plum);
}

.paired-card__half p {
  opacity: 0.85;
}

.paired-card__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--color-plum);
  opacity: 0.55;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--color-plum);
  color: var(--color-plum);
  margin: 0 auto var(--space-2);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

.badge--available {
  background: #e3f5e6;
  color: #1f7a37;
}

.badge--soon {
  background: var(--color-lavender-tint);
  color: var(--color-lavender);
  border: 1px solid var(--color-primary-dark);
}

/* Service chip groups */
.service-chip-group {
  margin-bottom: var(--space-4);
}

/* Group label styled as a purple pill matching the news panel's card color. */
.service-chip-group__title {
  display: inline-block;
  background: var(--color-news-panel-bg);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

.service-chip-group__desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.service-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Each department chip styled pink, matching the Hero eyebrow pill. */
.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-primary);
  border: none;
  color: var(--color-plum);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: normal;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

/* Second Opinion departments only — reverted back to the original white chip style,
   matching the rest of the site; Nursing & Caregiver chips stay pink. */
[data-service-chips="second-opinion"] .service-chip {
  background: var(--color-white);
  border: 1px solid var(--color-primary-dark);
  color: var(--color-text);
  font-weight: 500;
}

.services-grid--soon {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  width: 100%;
  margin: var(--space-4) 0 0;
}

/* Get the App card (shared across every page) */
.main-card--download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-lavender-tint);
  color: var(--color-plum);
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}

.play-badge svg {
  flex-shrink: 0;
}

.download-note {
  margin: var(--space-2) 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.download-note .badge {
  margin-bottom: 0;
}

/* Footer — same green-to-olive gradient as the header, per explicit request */
.site-footer {
  background: var(--gradient-header-footer);
  padding: var(--space-5) 0 var(--space-3);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 700;
  color: var(--color-plum);
}

.footer-brand img {
  height: 40px;
  width: 40px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--space-3);
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-plum);
}

.footer-bottom {
  background: var(--color-primary);
  color: var(--color-plum);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .news-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-top: var(--space-3);
  }

  .main-card--hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-image,
  .about-photo {
    order: -1;
  }

  .steps,
  .services-grid,
  .service-cards,
  .trust {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .site-nav {
    display: none;
  }

  .brand img {
    height: 48px;
    width: 48px;
  }

  .steps,
  .services-grid,
  .service-cards,
  .trust {
    grid-template-columns: 1fr;
  }

  .main-card--download {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .main-card {
    padding: var(--space-4);
  }
}
