/* Tenant public clinic landing (/clinic/) — clinical editorial design system */
:root {
  /* Canvas */
  --tpl-wash: #fbf9f8;
  --tpl-surface: #ffffff;
  --tpl-surface-soft: #f3f5f7;

  /* Brand (aligned with DESIGN_CLYNIC_UI_COLOR_AND_SEMANTIC_SYSTEM) */
  --tpl-brand: #28536b;
  --tpl-brand-hover: #22485d;
  --tpl-secondary: #7ea8be;
  --tpl-secondary-soft: rgba(126, 168, 190, 0.14);
  --tpl-accent-soft: rgba(40, 83, 107, 0.08);

  /* Hairlines */
  --tpl-border: #e0e5eb;
  --tpl-border-strong: #c9d1da;

  /* Text */
  --tpl-text: #1f2a33;
  --tpl-muted: #5c6b76;
  --tpl-muted-2: #8a97a3;

  /* Type */
  --tpl-font-display: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --tpl-font-body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --tpl-h1: clamp(2.25rem, 4.5vw, 3.5rem);
  --tpl-h2: clamp(1.6rem, 2.8vw, 2.15rem);
  --tpl-h3: clamp(1.1rem, 1.6vw, 1.35rem);
  --tpl-body: 1.0625rem;
  --tpl-small: 0.9375rem;
  --tpl-eyebrow: 0.75rem;

  /* Space */
  --tpl-space-1: 0.5rem;
  --tpl-space-2: 0.75rem;
  --tpl-space-3: 1rem;
  --tpl-space-4: 1.5rem;
  --tpl-space-5: 2.5rem;
  --tpl-space-6: 4rem;
  --tpl-space-7: 6rem;
  --tpl-space-8: 8rem;

  /* Chrome */
  --tpl-radius-sm: 8px;
  --tpl-radius-md: 12px;
  --tpl-radius-lg: 16px;
  --tpl-shadow-sm: 0 1px 2px rgba(40, 83, 107, 0.06);
  --tpl-shadow-md: 0 10px 28px rgba(40, 83, 107, 0.08);
  --tpl-card-shadow: var(--tpl-shadow-sm);
}

.tpl-public {
  color: var(--tpl-text);
  background: var(--tpl-wash);
  font-family: var(--tpl-font-body);
  font-size: var(--tpl-body);
  scroll-behavior: smooth;
}

.tpl-public:focus-visible,
.tpl-public a:focus-visible,
.tpl-public button:focus-visible,
.tpl-public .btn:focus-visible {
  outline: 2px solid var(--tpl-brand);
  outline-offset: 2px;
}

/* ——— Nav ——— */
.tpl-public .navbar-tpl {
  background: var(--tpl-brand);
  box-shadow: none;
  border-bottom: 1px solid transparent;
  padding-block: 0.65rem;
}

.tpl-public .navbar-tpl.is-scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: var(--tpl-shadow-sm);
}

.tpl-public .navbar-tpl .nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  font-size: var(--tpl-small);
  padding-inline: 0.65rem;
}

.tpl-public .navbar-tpl .nav-link:hover,
.tpl-public .navbar-tpl .nav-link:focus {
  color: #fff;
}

.tpl-public .navbar-tpl .nav-link.tpl-nav-quiet {
  color: rgba(255, 255, 255, 0.62);
  font-weight: 400;
}

.tpl-public .navbar-brand-tpl {
  color: #fff !important;
  font-family: var(--tpl-font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

/* ——— Buttons ——— */
.tpl-btn-primary {
  background: var(--tpl-brand);
  border-color: var(--tpl-brand);
  color: #fff;
  border-radius: var(--tpl-radius-sm);
  font-weight: 600;
  box-shadow: none;
}

.tpl-btn-primary:hover,
.tpl-btn-primary:focus {
  background: var(--tpl-brand-hover);
  border-color: var(--tpl-brand-hover);
  color: #fff;
}

.tpl-btn-outline {
  border-color: var(--tpl-brand);
  color: var(--tpl-brand);
  border-radius: var(--tpl-radius-sm);
  font-weight: 600;
  background: transparent;
}

.tpl-btn-outline:hover,
.tpl-btn-outline:focus {
  background: var(--tpl-accent-soft);
  border-color: var(--tpl-brand);
  color: var(--tpl-brand);
}

.tpl-btn-ghost-light {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  background: transparent;
  border-radius: var(--tpl-radius-sm);
  font-weight: 600;
}

.tpl-btn-ghost-light:hover,
.tpl-btn-ghost-light:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.tpl-btn-ghost {
  border: 1px solid var(--tpl-border-strong);
  color: var(--tpl-text);
  background: transparent;
  border-radius: var(--tpl-radius-sm);
  font-weight: 600;
}

.tpl-btn-ghost:hover,
.tpl-btn-ghost:focus {
  border-color: var(--tpl-brand);
  color: var(--tpl-brand);
  background: var(--tpl-accent-soft);
}

.tpl-link-text {
  color: var(--tpl-muted);
  font-weight: 500;
  text-decoration: none;
  font-size: var(--tpl-small);
}

.tpl-link-text:hover {
  color: var(--tpl-brand);
  text-decoration: underline;
}

.tpl-hero--has-img .tpl-link-text {
  color: rgba(255, 255, 255, 0.85);
}

.tpl-hero--has-img .tpl-link-text:hover {
  color: #fff;
}

/* ——— Hero ——— */
.tpl-hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, var(--tpl-space-7)) 0;
}

.tpl-hero--light {
  background: var(--tpl-wash);
  color: var(--tpl-text);
}

.tpl-hero--light .tpl-hero-lead {
  color: var(--tpl-muted);
}

.tpl-hero--has-img {
  color: #fff;
  background-color: var(--tpl-brand);
  background-image:
    linear-gradient(105deg, rgba(31, 42, 51, 0.72) 0%, rgba(40, 83, 107, 0.55) 55%, rgba(31, 42, 51, 0.35) 100%),
    var(--tpl-hero-image);
  background-size: cover;
  background-position: center;
}

.tpl-hero--has-img .tpl-hero-lead {
  color: rgba(255, 255, 255, 0.9);
}

.tpl-hero-title {
  font-family: var(--tpl-font-display);
  font-size: var(--tpl-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  max-width: 16ch;
}

.tpl-hero-lead {
  font-size: 1.125rem;
  line-height: 1.55;
  margin-top: var(--tpl-space-3);
  max-width: 62ch;
}

.tpl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: var(--tpl-space-4);
}

.tpl-hero__meta {
  margin-top: var(--tpl-space-3);
}

.tpl-hero-rating {
  font-size: var(--tpl-small);
  color: var(--tpl-muted);
  margin: 0;
}

.tpl-hero--has-img .tpl-hero-rating {
  color: rgba(255, 255, 255, 0.85);
}

/* ——— Sections ——— */
.tpl-section {
  padding-block: clamp(3.5rem, 8vw, var(--tpl-space-7));
}

.tpl-section--tight {
  padding-block: clamp(2.5rem, 5vw, var(--tpl-space-6));
}

.tpl-section--cta {
  padding-block: clamp(4rem, 9vw, var(--tpl-space-8));
}

.tpl-section--white {
  background: var(--tpl-surface);
}

.tpl-section--soft {
  background: var(--tpl-surface-soft);
}

.tpl-section__intro {
  margin-bottom: var(--tpl-space-5);
  max-width: 40rem;
}

.tpl-section__intro h2,
.tpl-section h2 {
  font-family: var(--tpl-font-display);
  font-size: var(--tpl-h2);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--tpl-text);
  margin: 0 0 var(--tpl-space-2);
}

.tpl-section__lead {
  color: var(--tpl-muted);
  margin: 0;
  max-width: 62ch;
  line-height: 1.55;
}

.tpl-eyebrow {
  display: block;
  font-size: var(--tpl-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tpl-muted-2);
  margin-bottom: var(--tpl-space-2);
}

.tpl-hero--has-img .tpl-eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.tpl-hero--light .tpl-eyebrow {
  color: var(--tpl-muted-2);
}

.tpl-measure {
  max-width: 62ch;
}

.tpl-preline {
  white-space: pre-line;
}

.tpl-muted {
  color: var(--tpl-muted);
}

.tpl-stat-num {
  font-variant-numeric: tabular-nums;
}

/* ——— Cards ——— */
.tpl-card {
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-radius-lg);
  background: var(--tpl-surface);
  height: 100%;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tpl-card:hover {
  border-color: var(--tpl-border-strong);
  box-shadow: var(--tpl-shadow-sm);
}

/* Legacy alias — prefer .tpl-card going forward */
.tpl-card-elev {
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-radius-lg);
  background: var(--tpl-surface);
  height: 100%;
  box-shadow: none;
}

.tpl-card-title {
  font-family: var(--tpl-font-display);
  font-size: var(--tpl-h3);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--tpl-text);
  margin: 0 0 0.35rem;
}

.tpl-card-kicker {
  font-size: var(--tpl-eyebrow);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tpl-muted-2);
  margin-bottom: var(--tpl-space-2);
}

.tpl-service-icon {
  display: inline-flex;
  align-items: center;
  color: var(--tpl-muted);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

/* Kept for patient-access / empty avatar fallback — quieter than before */
.tpl-icon-round {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--tpl-radius-sm);
  background: var(--tpl-surface-soft);
  color: var(--tpl-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

/* ——— Journey steps ——— */
.tpl-steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--tpl-border);
}

@media (min-width: 992px) {
  .tpl-steps {
    grid-template-columns: repeat(4, 1fr);
    border-top: none;
    border-left: 1px solid var(--tpl-border);
  }
}

.tpl-step {
  padding: var(--tpl-space-4);
  border-bottom: 1px solid var(--tpl-border);
}

@media (min-width: 992px) {
  .tpl-step {
    border-bottom: none;
    border-right: 1px solid var(--tpl-border);
  }
}

.tpl-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--tpl-border-strong);
  color: var(--tpl-muted);
  font-weight: 600;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--tpl-space-3);
}

.tpl-step h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--tpl-text);
}

.tpl-step p {
  margin: 0;
  font-size: var(--tpl-small);
  color: var(--tpl-muted);
  line-height: 1.5;
}

/* ——— Platform / privacy definition rows ——— */
.tpl-def-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--tpl-border);
}

@media (min-width: 768px) {
  .tpl-def-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tpl-def {
  padding: var(--tpl-space-4) 0;
  border-bottom: 1px solid var(--tpl-border);
}

@media (min-width: 768px) {
  .tpl-def:nth-child(odd) {
    padding-right: var(--tpl-space-4);
  }

  .tpl-def:nth-child(even) {
    padding-left: var(--tpl-space-4);
    border-left: 1px solid var(--tpl-border);
  }
}

.tpl-def h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--tpl-text);
}

.tpl-def p {
  margin: 0;
  font-size: var(--tpl-small);
  color: var(--tpl-muted);
  line-height: 1.5;
}

.tpl-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tpl-check-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--tpl-muted);
  line-height: 1.5;
}

.tpl-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--tpl-secondary);
}

/* ——— CTA band ——— */
.tpl-cta-band {
  background: var(--tpl-surface-soft);
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.tpl-cta-band h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--tpl-text);
  margin: 0 0 0.5rem;
}

.tpl-cta-band p {
  margin: 0;
  color: var(--tpl-muted);
  max-width: 52ch;
  line-height: 1.5;
}

/* ——— Team ——— */
.tpl-team-photo {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: var(--tpl-radius-md);
}

.tpl-team-photo-fallback {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--tpl-radius-md);
  background: var(--tpl-surface-soft);
  color: var(--tpl-muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* ——— Testimonials ——— */
.tpl-quote {
  border: none;
  border-left: 2px solid var(--tpl-border-strong);
  border-radius: 0;
  background: transparent;
  padding: 0 0 0 var(--tpl-space-4);
  margin: 0;
}

.tpl-quote p {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--tpl-text);
  margin: 0 0 0.75rem;
}

.tpl-quote footer {
  font-size: var(--tpl-small);
  color: var(--tpl-muted-2);
}

/* ——— Contact ——— */
.tpl-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tpl-contact-list li {
  margin-bottom: 0.85rem;
  color: var(--tpl-muted);
  line-height: 1.45;
}

.tpl-contact-list a {
  color: var(--tpl-brand);
  text-decoration: none;
  font-weight: 500;
}

.tpl-contact-list a:hover {
  text-decoration: underline;
}

.tpl-map-frame {
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-radius-lg);
  overflow: hidden;
  background: var(--tpl-surface);
}

.tpl-social a {
  color: var(--tpl-muted);
  font-size: var(--tpl-small);
  font-weight: 500;
  text-decoration: none;
  margin-right: 1rem;
}

.tpl-social a:hover {
  color: var(--tpl-brand);
}

/* ——— Footer ——— */
.tpl-footer {
  background: var(--tpl-surface);
  border-top: 1px solid var(--tpl-border);
  padding-block: var(--tpl-space-5) !important;
}

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

.tpl-footer a:hover {
  color: var(--tpl-brand);
}

/* ——— Reveal (optional) ——— */
@media (prefers-reduced-motion: no-preference) {
  .tpl-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }

  .tpl-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 767.98px) {
  .tpl-hero {
    padding: 2.75rem 0;
  }

  .tpl-hero-title {
    max-width: none;
  }
}
