/**
 * Shared singular use-case presentation.
 *
 * Loaded after the shared theme and pattern styles on every singular use_case.
 * Every selector is additionally scoped to WordPress's native single-use_case
 * body class, so this file cannot restyle pages, posts, or archives.
 *
 * This is presentation-only CSS. It must not hide, replace, or generate editorial
 * content; the saved Gutenberg blocks remain the content source of truth.
 */

/* ==========================================================================
   Use-case design tokens and article foundation
   ========================================================================== */

body.single-use_case {
  --hapster-use-case-ink: var(--ink-900, #0b0f14);
  --hapster-use-case-ink-soft: var(--ink-600, #2a3340);
  --hapster-use-case-ink-muted: var(--ink-400, #6b7585);
  --hapster-use-case-surface: #ffffff;
  --hapster-use-case-surface-soft: var(--off-white, #fafaf8);
  --hapster-use-case-line: var(--hairline, #eceef1);
  --hapster-use-case-green: var(--brand-accent, #7dc6ad);
  --hapster-use-case-green-strong: var(--brand-accent-strong, #5fae94);
  --hapster-use-case-green-ink: var(--brand-accent-ink, #0a2a22);
  --hapster-use-case-yellow: var(--hapster-orange, #ffc000);
  --hapster-use-case-navy: var(--deep-navy, #082033);
  --hapster-use-case-radius: var(--radius-soft, 14px);
  --hapster-use-case-reading-width: 46rem;
  --hapster-use-case-article-width: 57rem;
  --hapster-use-case-shadow-soft: 0 18px 50px rgba(8, 20, 30, 0.08);
  --hapster-use-case-shadow-card: 0 10px 30px rgba(8, 20, 30, 0.06);
}

body.single-use_case .hapster-content-article {
  width: min(100%, var(--hapster-use-case-article-width));
  max-width: var(--hapster-use-case-article-width);
  margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 4.5rem) clamp(1rem, 3vw, 1.75rem)
    clamp(4rem, 8vw, 7rem);
  color: var(--hapster-use-case-ink-soft);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
}

body.single-use_case .hapster-content-article :where(
  h1,
  h2,
  h3,
  h4,
  p,
  li,
  a,
  cite,
  strong,
  em,
  button
) {
  font-family: inherit;
}

body.single-use_case .hapster-content-article__inner {
  max-width: none;
  color: var(--hapster-use-case-ink-soft);
  --hapster-prose-text: var(--hapster-use-case-ink-soft);
  --hapster-prose-heading: var(--hapster-use-case-ink);
  --hapster-prose-strong: var(--hapster-use-case-ink);
  --hapster-prose-marker: var(--hapster-use-case-green-ink);
  --hapster-prose-link: var(--hapster-use-case-green-ink);
  --hapster-prose-link-hover: var(--hapster-use-case-ink);
  --hapster-prose-rule: var(--hapster-use-case-line);
  --hapster-prose-quote-bar: var(--hapster-use-case-green);
  --hapster-prose-flow: 1rem;
}

body.single-use_case .hapster-content-article :where(p, li) {
  color: var(--hapster-use-case-ink-soft);
  font-size: inherit;
  line-height: 1.7;
}

body.single-use_case .hapster-content-article :where(h1, h2, h3, h4) {
  color: var(--hapster-use-case-ink);
  text-wrap: balance;
}

body.single-use_case .hapster-content-article h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

body.single-use_case .hapster-content-article h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

body.single-use_case .hapster-content-article h3 {
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

body.single-use_case .hapster-content-article a {
  color: var(--hapster-use-case-green-ink);
  text-decoration-color: color-mix(in srgb, var(--hapster-use-case-green) 70%, transparent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

body.single-use_case .hapster-content-article a:hover {
  color: var(--hapster-use-case-ink);
}

body.single-use_case .hapster-content-article :where(a, button):focus-visible {
  outline: 3px solid var(--hapster-use-case-yellow);
  outline-offset: 3px;
}

/* ==========================================================================
   Logo and hero
   ========================================================================== */

body.single-use_case .hapster-content-article__inner > .wp-block-image:first-child {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin: 0 auto -2.25rem;
  padding: 0.9rem 1.25rem;
  background: var(--hapster-use-case-surface);
  border: 1px solid var(--hapster-use-case-line);
  border-radius: calc(var(--hapster-use-case-radius) + 4px);
  box-shadow: var(--hapster-use-case-shadow-card);
}

body.single-use_case
  .hapster-content-article__inner
  > .wp-block-image:first-child
  img {
  display: block;
  max-height: 5.5rem;
  object-fit: contain;
}

body.single-use_case .hapster-uc-hero.wp-block-group {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: clamp(4.5rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem)
    clamp(2.25rem, 5vw, 4rem);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(125, 198, 173, 0.22),
      transparent 42%
    ),
    var(--hapster-use-case-surface);
  border: 1px solid var(--hapster-use-case-line);
  border-radius: calc(var(--hapster-use-case-radius) + 6px);
  box-shadow: var(--hapster-use-case-shadow-soft);
  text-align: center;
}

body.single-use_case .hapster-uc-hero::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 12rem;
  height: 12rem;
  border: 1px solid rgba(125, 198, 173, 0.28);
  border-radius: 999px;
  pointer-events: none;
}

body.single-use_case .hapster-uc-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 auto 1.15rem;
  padding: 0.45rem 0.8rem;
  background: rgba(125, 198, 173, 0.2);
  border: 1px solid rgba(95, 174, 148, 0.32);
  border-radius: 999px;
  color: var(--hapster-use-case-green-ink);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.single-use_case .hapster-uc-hero .hapster-uc-hero__title {
  max-width: 16ch;
  margin-inline: auto;
  color: var(--hapster-use-case-ink);
}

body.single-use_case .hapster-uc-hero .wp-block-buttons:empty {
  display: none;
}

/* ==========================================================================
   Client profile and factual details
   ========================================================================== */

body.single-use_case .hapster-uc-profile.wp-block-group {
  margin-block-start: clamp(1.5rem, 3vw, 2.25rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--hapster-use-case-surface);
  border: 1px solid var(--hapster-use-case-line);
  border-radius: calc(var(--hapster-use-case-radius) + 2px);
  box-shadow: var(--hapster-use-case-shadow-card);
}

body.single-use_case .wp-block-list.hapster-uc-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 0;
}

body.single-use_case .wp-block-list.hapster-uc-facts > li {
  min-width: 0;
  margin: 0;
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid var(--hapster-use-case-line);
  color: var(--hapster-use-case-ink-soft);
  line-height: 1.55;
}

body.single-use_case .wp-block-list.hapster-uc-facts > li:nth-child(odd) {
  padding-right: clamp(1rem, 3vw, 2rem);
}

body.single-use_case .wp-block-list.hapster-uc-facts > li:nth-child(even) {
  padding-left: clamp(1rem, 3vw, 2rem);
  border-left: 1px solid var(--hapster-use-case-line);
}

body.single-use_case .wp-block-list.hapster-uc-facts > li > strong {
  color: var(--hapster-use-case-ink);
  font-weight: 750;
}

/* ==========================================================================
   Long-form section rhythm and ordinary lists
   ========================================================================== */

body.single-use_case .hapster-uc-section.wp-block-group {
  margin-block-start: clamp(2.75rem, 6vw, 5rem);
  padding-block-start: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--hapster-use-case-line);
}

body.single-use_case .hapster-uc-section > h2 {
  max-width: 24ch;
}

body.single-use_case .hapster-uc-section > :where(p, h3) {
  max-width: var(--hapster-use-case-reading-width);
}

body.single-use_case
  .hapster-uc-section
  > .wp-block-list:not(.hapster-uc-results) {
  max-width: var(--hapster-use-case-reading-width);
  margin: clamp(1rem, 2vw, 1.5rem) 0 0;
  padding: 0;
  list-style: none;
}

body.single-use_case
  .hapster-uc-section
  > .wp-block-list:not(.hapster-uc-results)
  > li {
  position: relative;
  margin: 0;
  padding: 0.65rem 0 0.65rem 1.5rem;
  border-bottom: 1px solid var(--hapster-use-case-line);
  color: var(--hapster-use-case-ink-soft);
}

body.single-use_case
  .hapster-uc-section
  > .wp-block-list:not(.hapster-uc-results)
  > li::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: 0.15rem;
  width: 0.48rem;
  height: 0.48rem;
  background: var(--hapster-use-case-green);
  border: 2px solid var(--hapster-use-case-surface);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--hapster-use-case-green-strong);
}

body.single-use_case
  .hapster-uc-section
  > .wp-block-list:not(.hapster-uc-results)
  > li::marker {
  content: "";
}

/* ==========================================================================
   Results / KPI cards
   ========================================================================== */

body.single-use_case .wp-block-list.hapster-uc-results {
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  padding: 0;
}

body.single-use_case .wp-block-list.hapster-uc-results > li {
  padding: clamp(1.2rem, 2.5vw, 1.65rem);
  background:
    linear-gradient(145deg, rgba(125, 198, 173, 0.13), transparent 62%),
    var(--hapster-use-case-surface);
  border: 1px solid var(--hapster-use-case-line);
  border-radius: var(--hapster-use-case-radius);
  box-shadow: var(--hapster-use-case-shadow-card);
  color: var(--hapster-use-case-ink-soft);
}

body.single-use_case .wp-block-list.hapster-uc-results > li::before {
  background: var(--hapster-use-case-green);
}

/* The shared pattern owns layout and type scale; this late use-case layer only
   applies the page-specific proof color to structured and legacy values. */
body.single-use_case
  .wp-block-list.hapster-uc-results
  > li
  > .hapster-uc-result__value,
body.single-use_case
  .wp-block-list.hapster-uc-results
  > li:not(.hapster-uc-result)
  > strong:first-of-type {
  color: var(--hapster-use-case-green-ink);
}

/* ==========================================================================
   Hapster solution diagram
   ========================================================================== */

body.single-use_case .hapster-uc-section + .hapster-diagram {
  margin-block-start: clamp(1.25rem, 2.5vw, 2rem);
}

body.single-use_case .hapster-diagram {
  width: 100%;
  max-width: none;
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    linear-gradient(145deg, rgba(125, 198, 173, 0.11), transparent 48%),
    var(--hapster-use-case-surface);
  border: 1px solid var(--hapster-use-case-line);
  border-radius: calc(var(--hapster-use-case-radius) + 4px);
  box-shadow: var(--hapster-use-case-shadow-card);
}

body.single-use_case .hapster-diagram .hapster-diagram__header {
  color: var(--hapster-use-case-green-ink);
}

body.single-use_case .hapster-diagram .hapster-diagram__badge {
  padding: 0.35rem 0.65rem;
  background: rgba(125, 198, 173, 0.18);
  border: 1px solid rgba(95, 174, 148, 0.3);
  border-radius: 999px;
  color: var(--hapster-use-case-green-ink);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

body.single-use_case
  .hapster-diagram
  .hapster-diagram__grid.wp-block-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.9rem;
  margin-block: 1.25rem 0;
}

body.single-use_case
  .hapster-diagram
  .hapster-diagram__grid.wp-block-columns
  + .hapster-diagram__grid.wp-block-columns {
  margin-block-start: 0.9rem;
}

body.single-use_case .hapster-diagram-card {
  min-width: 0;
  padding: 1.15rem;
  background: var(--hapster-use-case-surface);
  border: 1px solid var(--hapster-use-case-line);
  border-radius: var(--hapster-use-case-radius);
}

body.single-use_case .hapster-diagram-card::before {
  color: var(--hapster-use-case-green-ink);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

body.single-use_case .hapster-diagram-card .hapster-diagram-card__title {
  margin-block-start: 0.65rem;
  color: var(--hapster-use-case-navy);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.4;
}

body.single-use_case .hapster-diagram-card .hapster-diagram-card__desc {
  margin-block-start: 0.45rem;
  color: var(--hapster-use-case-ink-soft);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

body.single-use_case .hapster-uc-quotes.wp-block-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-block-start: clamp(1.25rem, 2.5vw, 2rem);
}

body.single-use_case .hapster-uc-quotes .wp-block-quote {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--hapster-use-case-surface-soft);
  border: 1px solid var(--hapster-use-case-line);
  border-left: 4px solid var(--hapster-use-case-green);
  border-radius: var(--hapster-use-case-radius);
  color: var(--hapster-use-case-ink-soft);
  font-style: normal;
}

body.single-use_case .hapster-uc-quotes .wp-block-quote p,
body.single-use_case .hapster-uc-quotes .wp-block-quote p em {
  margin: 0;
  color: var(--hapster-use-case-ink-soft);
  font-size: 1rem;
  font-style: normal;
  line-height: 1.7;
}

body.single-use_case .hapster-uc-quotes .wp-block-quote strong {
  color: var(--hapster-use-case-ink);
  font-weight: 750;
}

body.single-use_case .hapster-uc-quotes .wp-block-quote cite {
  display: block;
  margin-block-start: 1rem;
  color: var(--hapster-use-case-green-ink);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Consecutive testimonial sections are visually joined without changing their
   saved block structure. */
body.single-use_case
  .hapster-uc-section:has(.hapster-uc-quotes)
  + .hapster-uc-section:has(.hapster-uc-quotes) {
  margin-block-start: 0;
  padding-block-start: clamp(1rem, 2vw, 1.5rem);
  border-top: 0;
}

/* ==========================================================================
   Closing CTA
   ========================================================================== */

body.single-use_case
  .hapster-content-article
  .is-style-hapster-section.is-style-hapster-surface {
  margin-block-start: clamp(3rem, 7vw, 5.5rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(125, 198, 173, 0.22),
      transparent 42%
    ),
    var(--hapster-use-case-navy);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(var(--hapster-use-case-radius) + 6px);
  box-shadow: 0 22px 60px rgba(8, 20, 30, 0.18);
}

body.single-use_case
  .hapster-content-article
  .is-style-hapster-section.is-style-hapster-surface
  h2 {
  max-width: 22ch;
  color: #ffffff;
}

body.single-use_case
  .hapster-content-article
  .is-style-hapster-section.is-style-hapster-surface
  > p {
  max-width: 40rem;
  margin-block-start: 0.75rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
}

body.single-use_case
  .hapster-content-article
  .is-style-hapster-section.is-style-hapster-surface
  .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 1.5rem;
}

body.single-use_case
  .hapster-content-article
  .is-style-hapster-section.is-style-hapster-surface
  .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

body.single-use_case
  .hapster-content-article
  .hapster-cta-contact
  .wp-block-button__link {
  background: var(--hapster-use-case-yellow);
  color: #111111;
}

body.single-use_case
  .hapster-content-article
  .hapster-cta-roi
  .wp-block-button__link {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

body.single-use_case
  .hapster-content-article
  .is-style-hapster-section.is-style-hapster-surface
  .wp-block-button__link:hover {
  transform: translateY(-2px);
}

body.single-use_case
  .hapster-content-article
  .hapster-cta-contact
  .wp-block-button__link:hover {
  background: #ffffff;
  color: var(--hapster-use-case-ink);
}

body.single-use_case
  .hapster-content-article
  .hapster-cta-roi
  .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  color: #ffffff;
}

/* ==========================================================================
   Related use-case cards
   ========================================================================== */

body.single-use_case .hapster-content-article__inner > section.mt-16 {
  margin-block-start: clamp(3rem, 7vw, 5.5rem);
  padding-block-start: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--hapster-use-case-line);
}

body.single-use_case .hapster-content-article__inner > section.mt-16 > h2 {
  margin: 0;
  color: var(--hapster-use-case-ink);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

body.single-use_case .hapster-content-article__inner > section.mt-16 > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block-start: 1.5rem;
}

body.single-use_case .hapster-content-article__inner > section.mt-16 > div > a {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--hapster-use-case-surface);
  border: 1px solid var(--hapster-use-case-line);
  border-radius: var(--hapster-use-case-radius);
  box-shadow: var(--hapster-use-case-shadow-card);
  color: var(--hapster-use-case-ink);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

body.single-use_case
  .hapster-content-article__inner
  > section.mt-16
  > div
  > a:hover {
  transform: translateY(-3px);
  border-color: var(--hapster-use-case-green-strong);
  box-shadow: var(--hapster-use-case-shadow-soft);
}

body.single-use_case
  .hapster-content-article__inner
  > section.mt-16
  > div
  > a
  > p:first-child {
  margin: 0;
  color: var(--hapster-use-case-green-ink);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.single-use_case
  .hapster-content-article__inner
  > section.mt-16
  > div
  > a
  > h3 {
  margin-block-start: 0.65rem;
  color: var(--hapster-use-case-ink);
  font-size: 1.125rem;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.012em;
}

body.single-use_case
  .hapster-content-article__inner
  > section.mt-16
  > div
  > a
  > p:last-child {
  margin-block: 0.75rem 0;
  color: var(--hapster-use-case-ink-soft);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ==========================================================================
   Responsive behavior
   ========================================================================== */

@media (max-width: 767px) {
  body.single-use_case .hapster-content-article {
    padding-inline: 0.75rem;
  }

  body.single-use_case
    .hapster-content-article__inner
    > .wp-block-image:first-child {
    margin-bottom: -1.75rem;
    padding: 0.75rem 1rem;
  }

  body.single-use_case .hapster-uc-hero.wp-block-group {
    padding: 3.75rem 1.25rem 2rem;
  }

  body.single-use_case .wp-block-list.hapster-uc-facts {
    grid-template-columns: 1fr;
  }

  body.single-use_case .wp-block-list.hapster-uc-facts > li,
  body.single-use_case .wp-block-list.hapster-uc-facts > li:nth-child(odd),
  body.single-use_case .wp-block-list.hapster-uc-facts > li:nth-child(even) {
    padding-inline: 0;
    border-left: 0;
  }

  body.single-use_case .hapster-uc-quotes.wp-block-group,
  body.single-use_case .hapster-content-article__inner > section.mt-16 > div {
    grid-template-columns: 1fr;
  }

  body.single-use_case
    .hapster-content-article
    .is-style-hapster-section.is-style-hapster-surface
    .wp-block-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  body.single-use_case
    .hapster-content-article
    .is-style-hapster-section.is-style-hapster-surface
    .wp-block-button,
  body.single-use_case
    .hapster-content-article
    .is-style-hapster-section.is-style-hapster-surface
    .wp-block-button__link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.single-use_case .hapster-content-article * {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}
