/* ═══════════════════════════════════════════════════
   Platform page — shared styles for platform.html
   ═══════════════════════════════════════════════════ */

/* ── HERO ── */
.plat-hero {
  padding-top: 64px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.plat-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 80% at 50% -20%,
    oklch(94% 0.06 192 / 0.55) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.plat-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(
    ellipse 70% 80% at 50% 30%,
    black 20%,
    transparent 75%
  );
  opacity: 0.4;
  pointer-events: none;
}

.plat-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px 72px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.plat-hero-inner .hero-title {
  font-size: clamp(36px, 5vw, 58px);
  max-width: 700px;
  margin: 0 auto 18px;
}

.plat-hero-inner .section-sub {
  margin: 0 auto 36px;
  max-width: 640px;
}

.plat-hero-diagram {
  margin-top: 48px;
}

/* ── FLOW DIAGRAM ── */
.flow-diagram {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  column-gap: 16px;
  row-gap: 56px;
  align-items: center;
  padding: 12px 8px 4px;
}

.flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.flow-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 148px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-top: 3px solid var(--flow-accent, var(--teal-mid));
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 4px 20px oklch(20% 0.04 240 / 0.06);
}

.flow-node-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.flow-node-ehr {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  --flow-accent: var(--orange);
}

.flow-node-portal {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.flow-node-provider {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  --flow-accent: oklch(62% 0.14 300);
}

.flow-node-hub {
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
}

.flow-label,
.flow-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.flow-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-light);
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.flow-badge {
  display: flex;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.flow-line {
  stroke: oklch(56% 0.13 192 / 0.28);
  stroke-width: 1.75;
  fill: none;
}

.flow-dot {
  fill: var(--teal);
}

.plat-hero-pills {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.plat-pill {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.plat-pill:hover {
  border-color: var(--teal-mid);
  color: var(--teal);
}

/* ── COMPONENT SECTIONS ── */
.plat-component {
  padding: 96px 32px;
  border-bottom: 1px solid var(--border);
}

.plat-component--alt {
  background: var(--bg);
}

.plat-component-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.plat-component-header {
  text-align: center;
  margin-bottom: 56px;
}

.plat-component-header .section-title {
  margin-bottom: 16px;
}

.plat-component-header .section-sub {
  max-width: 620px;
  margin: 0 auto;
}

/* ── FEATURE GRID ── */
.plat-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plat-feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 24px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.plat-component--alt .plat-feature-card {
  background: var(--white);
}

.plat-feature-card:hover {
  border-color: var(--teal-mid);
  box-shadow: 0 4px 16px oklch(56% 0.13 192 / 0.08);
}

.plat-feature-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 14px;
}

.plat-feature-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.35;
}

.plat-feature-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── AUDIENCE GROUPS ── */
.plat-audience-group {
  margin-top: 48px;
}

.plat-audience-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 20px;
}

/* ── SECTION IMAGE ── */
.plat-section-image {
  margin-top: 48px;
  margin-bottom: 48px;
}

.plat-section-caption {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.plat-section-img {
  width: 100%;
  max-width: 960px;
  border-radius: 12px;
  box-shadow: 0 8px 40px oklch(20% 0.04 240 / 0.12);
  display: block;
  margin: 0 auto;
}

/* ── CTA: single-column centered override ── */
.cta-inner {
  display: block;
}

.cta-content {
  text-align: center;
}

.cta-actions {
  justify-content: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .plat-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .flow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    max-width: 220px;
    padding: 8px 0;
  }

  .flow-svg,
  .flow-label,
  .flow-badge {
    display: none;
  }

  .flow-node {
    width: 100%;
  }

  .flow-node::after {
    content: '↓';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--teal-mid);
    font-size: 18px;
    line-height: 1;
  }

  .flow-node-hub::after {
    content: '↻ back to Hospital / EHR';
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    bottom: -22px;
  }
}

@media (max-width: 600px) {
  .plat-hero {
    padding: 64px 24px 72px;
  }

  .plat-component {
    padding: 72px 24px;
  }

  .plat-features {
    grid-template-columns: 1fr;
  }
}
