/* =========================================================
   Helixa Health website v2 - about, get the app and 404
   ========================================================= */

/* ---------- page hero ---------- */
.ph-hero { padding-top: calc(env(safe-area-inset-top, 0px) + 136px); padding-bottom: var(--s700); }
.ph-hero h1 { max-width: 760px; margin-top: var(--s200); }
.ph-hero > p + h1 + p { max-width: 680px; margin-top: var(--s300); color: var(--sub); }
.ph-hero-tight { padding-bottom: var(--s500); }
@media (max-width: 860px) {
  .ph-hero { padding-top: calc(env(safe-area-inset-top, 0px) + 112px); }
}

.about-body { padding-bottom: var(--s900); }
.gap-top { margin-top: var(--s900); }
@media (max-width: 860px) {
  .about-body { padding-bottom: var(--s700); }
  .gap-top { margin-top: var(--s700); }
}

/* ---------- tagline (words light up through [data-words] in base.css) ---------- */
.tag-sec { padding-block: 0 var(--s900); }
.tagline { max-width: 880px; }
@media (max-width: 860px) { .tag-sec { padding-bottom: var(--s700); } }

/* ---------- mission and commitments ---------- */
.mission { max-width: 22em; font-weight: 500; }
.commit { grid-template-columns: repeat(3, 1fr); }
.commit .red { margin-top: var(--s75); }
@media (max-width: 900px) { .commit { grid-template-columns: 1fr; } }

/* ---------- founders ---------- */
/* Cards on the soft surface. Portraits are round with a brand ring; in light mode they
   multiply onto the card, so the different photo backgrounds read as one set. */
.founders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s200); }
@media (max-width: 1100px) { .founders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .founders { grid-template-columns: 1fr; } }
.founder {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: var(--s400); border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
  transition: transform var(--hov-out) var(--hov-ease), box-shadow var(--hov-out) var(--hov-ease), border-color var(--hov-out) ease;
}
.founder > div { display: flex; flex-direction: column; align-items: flex-start; flex: 1; width: 100%; }
.fph {
  width: 112px; height: 112px; object-fit: cover; object-position: center 22%;
  border-radius: 50%; margin-bottom: var(--s300); background: var(--surface);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px color-mix(in oklab, var(--primary) 55%, transparent);
  mix-blend-mode: multiply; transition: transform var(--hov-out) var(--hov-ease), box-shadow var(--hov-out) var(--hov-ease);
}
.is-dark .fph { mix-blend-mode: normal; }
.founder h3 { letter-spacing: -0.02em; }
.founder .role { margin-top: var(--s50); }
.founder .summary { margin-top: var(--s200); }
.creds { display: flex; flex-wrap: wrap; gap: var(--s50); margin: var(--s300) 0 0; padding: 0; list-style: none; }
.creds li {
  border-radius: 999px; padding: 4px 10px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); font-family: var(--font); font-size: 0.75rem; font-weight: 500; letter-spacing: 0;
}
/* the bio button sits on the bottom edge of every card, whatever the text length */
.founder .creds { margin-bottom: var(--s300); }
.founder .btn { margin-top: auto; }
@media (hover: hover) and (pointer: fine) {
  .founder:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -40px rgba(13, 63, 63, 0.45); border-color: color-mix(in oklab, var(--primary) 40%, var(--line)); transition-duration: var(--hov-in); }
  .founder:hover .fph { transform: scale(1.04); box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--primary); transition: transform var(--hov-in) var(--hov-ease) 0.08s, box-shadow var(--hov-in) var(--hov-ease) 0.08s; }
}
@media (max-width: 560px) {
  .founder { padding: var(--s300); }
  .fph { width: 88px; height: 88px; }
}

/* ---------- team ---------- */
.team {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s400) var(--s200);
  margin: 0; padding: 0; list-style: none;
}
@media (max-width: 1100px) { .team { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s300) var(--s200); } }
.tm {
  width: 100%; display: flex; flex-direction: column; gap: var(--s100);
  margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer; border-radius: 20px;
}
.tm-ph {
  position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: 20px; background: var(--surface);
}
.tm-ph::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 6%, transparent);
  background: linear-gradient(to top, color-mix(in oklab, #0d3f3f 35%, transparent), transparent 45%);
  opacity: 0; transition: opacity var(--hov-out) var(--hov-ease);
}
.tm img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
  mix-blend-mode: multiply; transition: transform var(--hov-out) var(--hov-ease);
}
.is-dark .tm img { mix-blend-mode: normal; }
.tm-go {
  position: absolute; right: var(--s100); bottom: var(--s100); z-index: 1;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--raised); color: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0; transform: translateY(8px) scale(0.85); transition: opacity 0.25s ease, transform var(--hov-out) var(--hov-ease);
}
.tm-go .ic { width: 14px; height: 14px; }
.tm-cap { display: flex; flex-direction: column; gap: var(--s25); padding-inline: var(--s25); }
.tm .more { display: none; }
.tm:focus-visible .tm-go { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .tm:hover img { transform: scale(1.05); transition-duration: var(--hov-in); }
  .tm:hover .tm-ph::after { opacity: 1; transition: opacity var(--hov-in) var(--hov-ease) 0.08s; }
  .tm:hover .tm-go { opacity: 1; transform: none; transition: opacity 0.4s ease 0.16s, transform var(--hov-in) var(--hov-ease) 0.16s; }
}
@media (hover: none) { .tm-go { opacity: 1; transform: none; } }

/* ---------- stats ---------- */
.stats { grid-template-columns: repeat(3, 1fr); margin-top: var(--s600); }
.stat strong { display: block; font-variant-numeric: tabular-nums; }
.contact { margin-top: var(--s200); }
.contact a { color: var(--ink); text-underline-offset: 3px; }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .stat { display: flex; align-items: baseline; gap: var(--s200); }
}

/* ---------- bio dialog: a sheet that slides in from the right ---------- */
html:has(.bio-dlg[open]) { overflow: hidden; }
.bio-dlg {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: env(safe-area-inset-top, 0px) 0 0; border: 0; border-left: 1px solid var(--line);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform 0.5s var(--ease);
}
.bio-dlg:not([open]) { display: none; }
.bio-dlg.on { transform: none; }
.bio-dlg::backdrop { background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.5s var(--ease); }
.bio-dlg.on::backdrop { opacity: 1; }
.bio-dlg .dh {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s200);
  padding: var(--s200) var(--s300); box-shadow: inset 0 -1px 0 var(--line);
}
.bio-dlg .dx {
  width: var(--s500); height: var(--s500); flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r); background: none; cursor: pointer;
  transition: border-color 0.2s ease, transform 0.12s ease-out;
}
.bio-dlg .dx:hover { border-color: var(--ink); }
.bio-dlg .dx:active { transform: scale(0.94); }
.bio-dlg .dx svg { width: 18px; height: 18px; }
.bio-dlg .db {
  flex: 1; overflow: auto; overscroll-behavior: contain;
  padding: var(--s300) var(--s300) calc(var(--s400) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: var(--s300);
}
.bio-hd { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s200); align-items: center; }
.bio-hd img { width: 96px; height: 96px; object-fit: cover; object-position: center top; border-radius: var(--r-lg); background: var(--surface); }
.bio-hd p { margin-top: var(--s50); }
.bio-text { display: flex; flex-direction: column; gap: var(--s200); }
@media (max-width: 560px) {
  .bio-dlg { border-radius: 0; border-left: 0; }
  .bio-dlg .dh { padding-inline: var(--s200); }
  .bio-dlg .db { padding-inline: var(--s200); }
}

/* ---------- get the app ---------- */
.apps { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .apps { grid-template-columns: 1fr; } }
.appcol { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s200); }
.appcol .grow { flex: 1; }
.hgrid > .appcol-deep { background: var(--deep); color: var(--on-deep); }
.appcol-deep p { color: var(--on-deep-sub); }
.appcol-deep .kick { color: var(--leaf-soft); }
.is-dark .hgrid > .appcol-deep { background: var(--surface); color: var(--ink); }
.is-dark .appcol-deep p { color: var(--sub); }
.is-dark .appcol-deep .kick { color: var(--leaf); }
.qr {
  width: 120px; height: 120px; padding: var(--s75);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.qr img { width: 100%; height: 100%; }
.badge { display: inline-flex; border-radius: var(--r); }
.badge img { height: 44px; width: auto; }
/* on a phone the code would have to be scanned by the same phone */
@media (max-width: 560px) { .qr { display: none; } }

/* ---------- 404 ---------- */
.nf {
  min-height: 72vh; padding-top: calc(env(safe-area-inset-top, 0px) + 200px); padding-bottom: var(--s900);
  display: flex; flex-direction: column; gap: var(--s300); align-items: flex-start;
}
@media (max-width: 860px) { .nf { padding-top: calc(env(safe-area-inset-top, 0px) + 152px); padding-bottom: var(--s700); } }
