/* Behapp public website — "Daylight" design system.
   Strict CSP: this file and the Tailwind build are the only styles on the
   site. No inline styles, no style attributes, no third-party origins.
   Tokens follow plans/2026-08-16-public-website-content.md. */

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Mulish-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Mulish-SemiBold.woff2") format("woff2");
}

:root {
  --bhp-ground: #F6F3F0;
  --bhp-ink: #0B3C69;
  --bhp-ink-soft: #4d6b8a;
  --bhp-blue: #708FF9;
  --bhp-blue-pale: #dbe4ff;
  --bhp-blue-deep: #4f64ab;
  --bhp-yellow: #FFCD3C;
  --bhp-card: #FFFFFF;
  --bhp-line: #e6e0d8;
  --bhp-tint: #fbf9f7;
  /* Header/footer band: one step deeper than the page ground so the bands
     never merge with ground-colored content blocks (round 4, Raj's pick:
     option A, chosen over the deeper #EAE2D7 after comparing both live). */
  --bhp-band: #EFEAE2;
}

body.bhp-site {
  margin: 0;
  background: var(--bhp-ground);
  color: var(--bhp-ink);
  font-family: "Mulish", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  /* Column layout pins the footer to the viewport bottom on short pages
     and lets the landing page fill the remaining height (.bhp-landing). */
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
body.bhp-site > main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
/* The last section's background stretches to meet the footer instead of
   leaving a strip of page ground on short pages. */
body.bhp-site > main > :last-child {
  flex-grow: 1;
}

/* Shared line-art vocabulary for inline SVG scenes (used on several pages) */
.ln {
  fill: none;
  stroke: #000;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ln-thin { stroke-width: 2; }
.fy { fill: #FFCD3C; }
.fb { fill: #708FF9; }
.fw { fill: #fff; }
.fmuted { fill: #b9c4d4; }

.bhp-anim-paused *,
.bhp-anim-paused *::before,
.bhp-anim-paused *::after {
  animation-play-state: paused !important;
}

.bhp-site a:focus-visible,
.bhp-site button:focus-visible {
  outline: 3px solid var(--bhp-yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

.bhp-shell {
  max-width: 74rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Accessible skip link: visually hidden until focused */
.bhp-skip {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 50;
  background: var(--bhp-ink);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.bhp-skip:focus-visible {
  left: 0.75rem;
}

.bhp-mark-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- header ---------- */
.bhp-header {
  background: var(--bhp-band);
}
/* The landing keeps the header on the page ground (one cohesive screen) */
.bhp-header-ground {
  background: var(--bhp-ground);
}
.bhp-mark-sm {
  width: 30px;
  height: 30px;
  flex: none;
}
.bhp-portal-btn {
  font-size: 0.92rem;
  text-decoration: none;
  border: 1.5px solid var(--bhp-ink);
  border-radius: 999px;
  padding: 0.42rem 1.05rem;
  font-weight: 500;
  color: inherit;
}
.bhp-portal-btn:hover {
  background: var(--bhp-ink);
  color: var(--bhp-ground);
}
.bhp-lang-current {
  color: var(--bhp-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--bhp-yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

/* Below the breakpoint the menu collapses behind a hamburger toggle;
   website.js flips .bhp-nav-open on the header. */
.bhp-nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--bhp-ink);
  border-radius: 0.6rem;
  color: var(--bhp-ink);
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}
.bhp-nav-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}
@media (max-width: 900px) {
  .bhp-nav-toggle {
    display: block;
  }
  .bhp-nav-menu {
    display: none;
  }
  .bhp-nav-open .bhp-nav-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1rem;
    padding: 1rem 0 0.4rem;
  }
  .bhp-nav-open .bhp-nav-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    font-size: 1.02rem;
  }
}

/* ---------- landing: one centered, full-height screen ---------- */
.bhp-landing {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 2rem 0 2.25rem;
}
.bhp-landing-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}
/* Compact variants so the whole screen fits a laptop viewport */
.bhp-landing .bhp-display {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
}
.bhp-landing .bhp-card {
  padding: 1.35rem 1.6rem 1.25rem;
  gap: 0.5rem;
}
.bhp-landing .bhp-card h2 {
  font-size: 1.35rem;
}
/* On small screens the centered text sits where the mark hangs; push the
   mark further out and soften it so the headline stays readable. */
@media (max-width: 640px) {
  .bhp-landing .bhp-hero-mark {
    top: -27rem;
    right: -25rem;
    opacity: 0.55;
  }
}
.bhp-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 2px solid var(--bhp-ink);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.bhp-privacy-pill:hover {
  background: var(--bhp-yellow);
}
.bhp-privacy-pill svg {
  width: 1.05rem;
  height: 1.05rem;
}
/* "or" divider between a card's primary and secondary action */
.bhp-or {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.6rem 0;
  color: var(--bhp-ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.bhp-or::before,
.bhp-or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--bhp-line);
}

/* ---------- hero ---------- */
.bhp-hero {
  position: relative;
  overflow: hidden;
  padding-top: 4.5rem;
}
.bhp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}
.bhp-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--bhp-blue-deep);
}
.bhp-display {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
.bhp-display em {
  font-style: normal;
  color: var(--bhp-blue-deep);
}

/* The mark, cropped past the top-right corner (echoes the iOS hero
   composition), spinning slowly with a breathing scale on an inner group. */
.bhp-hero-mark {
  position: absolute;
  top: -19rem;
  right: -17rem;
  width: 42rem;
  height: 42rem;
  z-index: 0;
  animation: bhp-spin 90s linear infinite;
}
/* On small screens the text sits where the mark hangs; soften the mark
   so the copy stays readable (same treatment as the landing). */
@media (max-width: 640px) {
  .bhp-hero-mark {
    top: -24rem;
    right: -22rem;
    opacity: 0.55;
  }
}
.bhp-breather {
  animation: bhp-breathe 7s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
}
@keyframes bhp-spin {
  to { transform: rotate(360deg); }
}
@keyframes bhp-breathe {
  from { transform: scale(1); }
  to { transform: scale(1.045); }
}

/* ---------- buttons ---------- */
.bhp-btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: 999px;
  padding: 0.78rem 1.6rem;
  border: 1.5px solid var(--bhp-ink);
  color: inherit;
}
.bhp-btn-primary {
  background: var(--bhp-ink);
  color: #fff;
}
.bhp-btn-primary:hover {
  background: var(--bhp-blue-deep);
  border-color: var(--bhp-blue-deep);
}
.bhp-btn-ghost:hover {
  background: #fff;
}
/* Yellow CTA for use on the dark band */
.bhp-btn-yellow {
  background: var(--bhp-yellow);
  color: var(--bhp-ink);
  border-color: var(--bhp-yellow);
}
.bhp-btn-yellow:hover {
  background: #ffd75e;
  border-color: #ffd75e;
}

/* ---------- day band: one day of behaviour, as Behapp sees it ----------
   White so it reads as its own section between ground blocks; the old
   4.2rem top margin (a landing-era leftover) caused a bare-ground gap
   under the researchers hero. */
.bhp-dayband {
  border-top: 1px solid var(--bhp-line);
  border-bottom: 1px solid var(--bhp-line);
  background: var(--bhp-card);
}
.bhp-dayband-inner {
  display: flex;
  align-items: flex-end;
  gap: 0.55%;
  padding: 1.4rem 0 0.7rem;
  /* Tall enough for two labeled activity lanes above the dot columns
     (researchers page) without labels ever meeting the dots. */
  height: 12rem;
  position: relative;
}
.bhp-hourcol {
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
}
.bhp-hourcol i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bhp-blue-pale);
  animation: bhp-dotbreathe 6s ease-in-out infinite;
}
.bhp-hourcol i.on {
  background: var(--bhp-blue);
}
.bhp-hourcol .hr {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--bhp-ink-soft);
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}
@keyframes bhp-dotbreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.28); }
}
/* The single yellow dot: an EMA questionnaire moment crossing the day */
.bhp-ping {
  position: absolute;
  top: 0.4rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bhp-yellow);
  box-shadow: 0 0 0 4px rgba(255, 205, 60, 0.3);
  animation: bhp-pingmove 24s linear infinite;
}
@keyframes bhp-pingmove {
  0% { left: 2%; opacity: 0; }
  4% { opacity: 1; }
  48% { left: 49%; }
  96% { left: 96%; opacity: 1; }
  100% { left: 98%; opacity: 0; }
}

/* ---------- pathway cards ---------- */
.bhp-card {
  background: var(--bhp-card);
  border: 1px solid var(--bhp-line);
  border-radius: 1rem;
  padding: 2.1rem 2.1rem 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
/* Top accent bar encodes audience: yellow = participant, blue = researcher */
.bhp-card-participant {
  border-top: 5px solid var(--bhp-yellow);
}
.bhp-card-researcher {
  border-top: 5px solid var(--bhp-blue);
}
.bhp-card-link {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}
.bhp-card-link::after {
  content: " \2192";
  color: var(--bhp-blue);
}

/* ---------- proof strip ---------- */
.bhp-proof {
  font-size: 0.92rem;
  color: var(--bhp-ink-soft);
}
.bhp-proof b {
  font-weight: 600;
  color: var(--bhp-ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- privacy band (the one dark band per page) ---------- */
.bhp-privacy-band {
  background: var(--bhp-ink);
  color: #c9d6ea;
}
.bhp-privacy-band h2 {
  color: #fff;
}
.bhp-privacy-band a:not(.bhp-btn) {
  color: var(--bhp-yellow);
  font-weight: 600;
  text-decoration: none;
}
.bhp-privacy-band a:not(.bhp-btn):hover {
  text-decoration: underline;
}

/* ---------- footer: the official dog artwork, draped over the footer's
   top edge (the artwork's built-in ground line removed per round 3) ---------- */
.bhp-footer {
  position: relative;
  background: var(--bhp-band);
  flex-shrink: 0;
}
.bhp-footer-dog {
  position: absolute;
  right: 4%;
  top: 0;
  width: 11.5rem;
  max-width: 38vw;
  /* Keeps the round-2 calibration: the dog's draping point (where the
     removed ground line sat, y≈159 in the 600x357 viewBox) rests exactly
     on the footer's top edge. */
  transform: translateY(-44.5%);
}
.bhp-footer a {
  color: inherit;
  text-decoration: none;
}
.bhp-footer a:hover {
  text-decoration: underline;
}

/* ---------- inner pages ---------- */
.bhp-display-sm {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}
.bhp-section-title {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* Sensor matrix and other data tables */
.bhp-table-wrap {
  overflow-x: auto;
}
.bhp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bhp-card);
  border: 1px solid var(--bhp-line);
  border-radius: 0.75rem;
  overflow: hidden;
}
.bhp-table th,
.bhp-table td {
  text-align: left;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--bhp-line);
}
.bhp-table thead th {
  border-top: 0;
  background: var(--bhp-tint);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bhp-ink-soft);
}
.bhp-table td.yes {
  color: var(--bhp-blue-deep);
  font-weight: 600;
}
.bhp-table td.no {
  color: var(--bhp-ink-soft);
}

/* How-a-study-runs timeline: a real sequence, so the numbers carry meaning */
.bhp-steps {
  counter-reset: step;
  list-style: none;
  /* Vertical reset only: `margin: 0` would outrank Tailwind's mx-auto
     (same specificity, this file loads later) and un-center the list. */
  margin-block: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.bhp-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.4rem;
}
.bhp-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--bhp-blue-pale);
  color: var(--bhp-blue-deep);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.bhp-steps b {
  font-weight: 600;
}

/* Publication list */
.bhp-pub {
  border-left: 3px solid var(--bhp-blue-pale);
  padding-left: 1.2rem;
}
.bhp-pub .authors {
  font-size: 0.88rem;
  color: var(--bhp-ink-soft);
}
.bhp-pub .title {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}
.bhp-pub .title:hover {
  color: var(--bhp-blue-deep);
}
.bhp-pub .ref {
  font-size: 0.88rem;
  color: var(--bhp-ink-soft);
}
.bhp-pub .ref b {
  color: var(--bhp-ink);
  font-weight: 600;
}

/* Transparency note above machine-translated legal text */
.bhp-mt-note {
  max-width: 46rem;
  background: #fff7dd;
  border: 2px solid var(--bhp-yellow);
  border-radius: 0.75rem;
  padding: 1.1rem 1.4rem;
  margin-bottom: 2rem;
}
.bhp-mt-note p {
  margin: 0;
}
.bhp-mt-note p + p {
  margin-top: 0.35rem;
  color: #33517a;
  font-size: 0.95rem;
}
.bhp-mt-note a {
  color: var(--bhp-blue-deep);
  font-weight: 600;
}

/* Long-form legal text (privacy policy body) */
.bhp-prose {
  max-width: 46rem;
}
.bhp-prose h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.2rem 0 0.7rem;
}
.bhp-prose p {
  margin: 0 0 1rem;
  color: #26496e;
}
.bhp-prose ul {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  list-style: disc;
  color: #26496e;
}
.bhp-prose li {
  margin-bottom: 0.5rem;
}
.bhp-prose a {
  color: var(--bhp-blue-deep);
  font-weight: 600;
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bhp-hero-mark,
  .bhp-breather,
  .bhp-hourcol i {
    animation: none;
  }
  .bhp-ping {
    animation: none;
    left: 49%;
    opacity: 1;
  }
}
