/* Healify 2027 — marketing layer.
   Scoped to islands and existing shell classes. Does not reset the
   Framer homepage body or hide content when motion is reduced.
   Cross-document view transitions are progressive enhancement
   (Chrome 126+, Safari 18.2). Firefox ignores the at-rule.
   Scroll-driven view timelines are not Baseline, so this file does not use them. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  .hf-stage {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  @starting-style {
    .hf-stage { transform: translateY(12px); }
  }

  .hf-ring__value {
    transition: stroke-dashoffset 1.15s cubic-bezier(0.22, 1, 0.36, 1);
  }
  @starting-style {
    .hf-ring__value { stroke-dashoffset: 326.726; }
  }

  .hf-brief__line {
    animation: hf-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .hf-brief__line:nth-child(2) { animation-delay: 0.08s; }
  .hf-brief__line:nth-child(3) { animation-delay: 0.16s; }
}

.site-header__logo { view-transition-name: healify-mark; }

.hf-stage,
.hf-band,
.hf-try-handoff,
.hf-blog-wedge {
  --hf-ink: #03040d;
  --hf-orange: #ff6942;
  --hf-muted: #5a5a6e;
  --hf-line: rgba(3, 4, 13, 0.1);
  --hf-display: "TWK Lausanne 600", "TWK Lausanne 500", "Inter", -apple-system, sans-serif;
  --hf-body: "TWK Lausanne 400", "Inter", -apple-system, sans-serif;
  --hf-mono: "Fragment Mono", ui-monospace, Menlo, monospace;
  font-family: var(--hf-body);
  color: var(--hf-ink);
}

.hf-stage {
  position: relative;
  margin: 0;
  padding: 72px 20px 80px;
  contain: layout style;
  background: #fff;
  border-top: 1px solid rgba(3, 4, 13, 0.06);
}

.hf-stage__inner,
.hf-band__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hf-stage__eyebrow,
.hf-band__eyebrow,
.hf-card__kicker,
.hf-flip__kicker,
.hf-blog-wedge__kicker {
  font-family: var(--hf-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hf-muted);
  margin: 0 0 12px;
}

.hf-stage__title,
.hf-band__title {
  font-family: var(--hf-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 14px;
  max-width: 16ch;
  text-wrap: balance;
}

.hf-stage__lead,
.hf-band__lead {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.55;
  color: var(--hf-muted);
  max-width: 42rem;
  margin: 0 0 12px;
}

.hf-stage__fit {
  margin: 0 0 28px;
  max-width: 42rem;
  font-size: 15px;
  line-height: 1.45;
  color: var(--hf-ink);
}

.hf-stage__grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.hf-card,
.hf-flip,
.hf-device {
  background: #fff;
  border: 1px solid var(--hf-line);
  border-radius: 22px;
  box-shadow: 0 18px 40px -28px rgba(3, 4, 13, 0.45);
  padding: 22px;
}

.hf-card--score {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 10px;
  background: #03040d;
  color: #fff;
  border-color: transparent;
  min-height: 280px;
}
.hf-card--score .hf-card__kicker { grid-row: 1; }
.hf-card--score .hf-ring { grid-row: 2; grid-column: 1; }
.hf-card--score .hf-card__hint { grid-row: 3; }
.hf-card--score .hf-card__value {
  grid-row: 2;
  grid-column: 1;
  align-self: center;
  margin: 0;
  color: #fff;
  font-size: 42px;
}

.hf-card--score .hf-card__kicker { color: rgba(255, 255, 255, 0.62); }

.hf-ring { width: 132px; height: 132px; }
.hf-ring__track,
.hf-ring__value { fill: none; stroke-width: 10; }
.hf-ring__track { stroke: rgba(255, 255, 255, 0.12); }
.hf-ring__value {
  stroke: #ff6942;
  stroke-linecap: round;
  stroke-dasharray: 326.726;
  stroke-dashoffset: 71.88;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
}

.hf-card__value {
  font-family: var(--hf-display);
  font-size: 40px;
  letter-spacing: -0.04em;
  margin: 0 auto;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-width: 3ch;
  text-align: center;
}

.hf-fit {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 28px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hf-fit li {
  margin: 0;
  padding: 16px 16px 18px;
  border: 1px solid rgba(3, 4, 13, 0.1);
  border-radius: 16px;
  background: #fff;
  font-size: 15px;
  line-height: 1.45;
}
.hf-fit li:first-child {
  background: #03040d;
  color: #fff;
  border-color: transparent;
}
.hf-fit li:first-child strong { color: #ffd2c4; }
.hf-fit strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hf-card__hint {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.hf-brief__line {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.45;
}
.hf-brief__line:last-child { margin-bottom: 0; }
.hf-card--brief {
  background: #03040d;
  color: #fff;
  border-color: transparent;
}
.hf-card--brief .hf-card__kicker,
.hf-device[data-hf-brief] .hf-card__kicker { color: #ffd2c4; }
.hf-card--brief .hf-brief__line,
.hf-device[data-hf-brief] .hf-brief__line {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px 18px 18px 18px;
  padding: 12px 14px;
}
@keyframes hf-rise {
  from { transform: translateY(8px); }
  to { transform: none; }
}

.hf-contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hf-contrast__col {
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(3, 4, 13, 0.08);
}
.hf-contrast__col--healify {
  background: #03040d;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 105, 66, 0.55);
  transform: translateY(-2px);
}
.hf-contrast__col--healify .hf-contrast__label { color: #ffd2c4; }
.hf-contrast__col:not(.hf-contrast__col--healify) {
  background: #fff;
  color: #5a5a6e;
}
.hf-contrast__label {
  font-family: var(--hf-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.hf-contrast__col p { margin: 0; font-size: 15px; line-height: 1.45; }
.hf-contrast__col.is-hot {
  transform: translateY(-2px);
}

.hf-stage__actions,
.hf-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  align-items: center;
}
.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--hf-display);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
}
.hf-btn--primary { background: #ff6942; color: #fff; }
.hf-btn--primary:hover { background: #e55a35; color: #fff; }
.hf-btn--ghost {
  background: transparent;
  color: var(--hf-ink);
  border-color: rgba(3, 4, 13, 0.16);
}
.hf-btn:active { transform: scale(0.98); }
.hf-btn:focus-visible {
  outline: 2px solid #ff6942;
  outline-offset: 3px;
}

.hf-flips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: min(1120px, calc(100% - 48px));
  margin: 8px auto 36px;
}
.hf-flip { padding: 0; }
.hf-flip summary {
  list-style: none;
  cursor: pointer;
  padding: 22px;
  min-height: 44px;
}
.hf-flip summary::-webkit-details-marker { display: none; }
.hf-flip summary strong {
  display: block;
  font-family: var(--hf-display);
  font-size: 22px;
  letter-spacing: -0.03em;
  margin-top: 6px;
}
.hf-flip__plan {
  margin: 0;
  padding: 0 22px 22px;
  color: var(--hf-muted);
  line-height: 1.5;
}
.hf-flip[open] { box-shadow: 0 0 0 1px rgba(255, 105, 66, 0.4), 0 18px 40px -28px rgba(255, 105, 66, 0.6); }
.hf-note {
  width: min(1120px, calc(100% - 48px));
  margin: -12px auto 40px;
  font-size: 13px;
  color: var(--hf-muted);
}

.hf-devices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: min(920px, calc(100% - 48px));
  margin: 8px auto 40px;
}
.hf-device {
  min-height: 220px;
  background: #03040d;
  color: #fff;
  border-radius: 32px;
  padding: 28px 24px;
}
.hf-device .hf-card__kicker { color: rgba(255, 255, 255, 0.6); }
.hf-device p { margin: 8px 0 0; font-size: 18px; line-height: 1.4; }

.hf-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: min(920px, calc(100% - 48px));
  margin: 0 auto 36px;
  padding: 0;
  list-style: none;
}
.hf-proof li {
  background: #fff;
  border: 1px solid var(--hf-line);
  border-radius: 18px;
  padding: 18px;
}
.hf-proof strong {
  display: block;
  font-family: var(--hf-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hf-muted);
  margin-bottom: 6px;
}

.hf-band {
  margin: 28px auto;
  width: min(720px, calc(100% - 32px));
}
.hf-band__inner {
  background: #03040d;
  color: #fff;
  border-radius: 24px;
  padding: 28px 24px;
}
.hf-band__title { color: #fff; font-size: clamp(26px, 4vw, 36px); max-width: 18ch; }
.hf-band__lead { color: rgba(255, 255, 255, 0.72); }
.hf-band .hf-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

.hf-blog-wedge {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(3, 4, 13, 0.08);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.hf-blog-wedge p { margin: 0; font-size: 16px; }
.hf-blog-wedge a { color: #ff6942; font-weight: 600; white-space: nowrap; }

.hf-try-handoff {
  position: fixed;
  z-index: 80;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(3, 4, 13, 0.92);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.hf-try-handoff p { margin: 0; font-size: 14px; }
.hf-try-handoff a { color: #ffb199; font-weight: 600; }

.hf-table-wrap { width: min(920px, calc(100% - 48px)); margin: 0 auto 28px; overflow-x: auto; }
.hf-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}
.hf-table th,
.hf-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hf-line);
  font-size: 15px;
  vertical-align: top;
}
.hf-table th { font-family: var(--hf-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.hf-table tr:last-child td { border-bottom: 0; }

/* Shells that already use landing classes pick up the 2027 surface. */
body:has(.landing-main) {
  background: #fff;
}
body:has(.landing-main) .hero__title { letter-spacing: -0.04em; }
body:has(.landing-main) .feature,
body:has(.landing-main) .flow__step,
body:has(.landing-main) .step,
body:has(.landing-main) .tier,
body:has(.landing-main) .about-value {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}
body:has(.article) .article__title,
body:has(.blog-hero) .blog-hero__title {
  letter-spacing: -0.035em;
  text-wrap: balance;
}

@supports (content-visibility: auto) {
  #scroll-health {
    content-visibility: auto;
    contain-intrinsic-size: auto 960px;
  }
}

.app-cta__wedge {
  margin: 16px 0 0;
  font-size: 14px;
  opacity: 0.86;
}
.app-cta__wedge a { color: inherit; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .hf-stage__grid,
  .hf-flips,
  .hf-devices,
  .hf-proof,
  .hf-contrast,
  .hf-fit { grid-template-columns: 1fr; }
  .hf-blog-wedge { flex-direction: column; align-items: flex-start; }
  .hf-try-handoff { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .hf-brief__line { animation: none; }
  .hf-btn:active { transform: none; }
}
