/*
 * True Helm website.
 *
 * One job: get the visitor to the APK. Everything is sized for a phone first, because most
 * visitors arrive from Instagram on the same device they will install on.
 *
 * Palette and type follow the app (ui/theme/AppColors.kt): near black ground, white numerals,
 * one cyan accent. Deliberately no gradients, no blur, no drop shadows and no rounded floating
 * cards. The page should read like an instrument, so blocks are separated by hairlines and empty
 * space rather than by decoration.
 *
 * Fonts are self hosted in assets/fonts/. Not a style preference: a page that promises "no data
 * leaves the phone" cannot hand every visitor to a font CDN on load. It also removes a render
 * blocking request from a page that has to be fast on mobile data.
 */

/* Latin subsets only. U+0000-00FF already covers the German umlauts in the legal pages. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("assets/fonts/oswald-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #05080c;
  --line: #1a2029;
  --text: #ffffff;
  --body: #c3ccd4;
  --muted: #8b95a7;
  --accent: #48e8e4;
  --warn: #e8c548;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Oswald", "Arial Narrow", var(--sans);

  --page: 1080px;
  --pad: 22px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #05080c;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.005em;
  color: var(--text);
  margin: 0 0 20px;
  text-wrap: balance;
}

h1 {
  font-size: clamp(42px, 12vw, 88px);
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 8vw, 46px);
  font-weight: 700;
}

h3 {
  font-size: 21px;
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.lede {
  font-size: 18px;
  color: var(--body);
  max-width: 46ch;
}

.eyebrow {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.note {
  font-size: 15px;
  color: var(--muted);
  max-width: 52ch;
}

/* ------------------------------------------------------------------ nav */

/*
 * Sticky, because the page is close to eight screens tall on a phone and the whole point of it is
 * one button. Solid background and a hairline, no blur and no shadow, so it stays part of the
 * instrument look rather than floating over it.
 */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 58px;
}

.nav img {
  height: 15px;
  width: auto;
  display: block;
}

@media (min-width: 480px) {
  .nav img {
    height: 17px;
  }

  .nav nav {
    gap: 22px;
  }

  .nav nav a {
    font-size: 13px;
    letter-spacing: 0.12em;
  }
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav nav a {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
}

.nav nav a:hover {
  color: var(--text);
}

/* The download link keeps the accent, so the one action stays the one coloured thing up here. */
.nav nav a.jump {
  color: var(--accent);
}

.nav nav a[aria-current="page"] {
  color: var(--text);
}

/* ------------------------------------------------------------------ beta bar */

/*
 * Sits above the sticky nav and scrolls away with the page, so it is read once and then gives the
 * screen back. Amber, not the accent: cyan stays reserved for the one action, the download.
 * A bar rather than a badge in the nav, because on a phone the nav has no room left.
 */
.beta-bar {
  background: #0d141c;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.4;
  color: var(--body);
}

.beta-bar .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.beta-bar b {
  flex: none;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--bg);
  background: var(--warn);
  border-radius: 2px;
  padding: 3px 6px 2px;
}

.beta-bar a {
  color: var(--accent);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ button */

.btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #05080c;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  padding: 19px 28px;
  border: 0;
  border-radius: 2px;
}

.btn:active {
  background: #35c9c6;
}

.btn-line {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ------------------------------------------------------------------ hero */

.hero {
  border-top: 0;
  padding: 44px 0 64px;
}

/*
 * A notch below the global h1 (42px / 12vw / 88px), because the headline now carries a second
 * line. At full size it ran to five lines on a phone.
 */
.hero h1 {
  font-size: clamp(36px, 10.4vw, 76px);
  margin-bottom: 22px;
}

/* Second line of the headline, the analysis half of the product, in the accent like .claim em. */
.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--accent);
}

.hero .lede {
  margin-bottom: 32px;
}

/* On the water / afterwards: two short columns under the download button. */
.halves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 52ch;
}

.halves p {
  font-size: 15px;
  color: var(--body);
  margin: 0;
}

.halves b {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/*
 * Product shot, phone and tablet on black. No frame and no border around it: the image already
 * carries its own black ground, so anything drawn around it would show as a box on the page.
 */
.hero-shot {
  margin: 36px auto 0;
  max-width: 480px;
}

/* ------------------------------------------------------------------ problem */

.claim {
  font-family: var(--display);
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 32px;
  max-width: 20ch;
}

.claim em {
  font-style: normal;
  color: var(--accent);
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 58ch;
}

.facts li {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  font-size: 17px;
}

/* ------------------------------------------------------------------ screens */

/*
 * Two across even on a phone. One per row made four screens about 2,500 px of scrolling, and at
 * half the width the digits are still the size they are meant to be read at.
 */
.screens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 16px;
  margin-top: 40px;
}

/*
 * A plain phone body around each screenshot: flat dark casing, hairline, round corners. Without it
 * the dark screens sank into the dark page and SESSIONS, mostly empty, read as a blank box rather
 * than a capture. No shadow, no gloss, for the same reason as everywhere else on the page.
 */
.screen .phone {
  max-width: 240px;
  margin-bottom: 14px;
  padding: 7px;
  background: #161c24;
  border: 1px solid #2c3540;
  border-radius: 22px;
}

.screen img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15px;
}

.screen h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 6px;
}

.screen p {
  font-size: 15px;
  line-height: 1.45;
  max-width: 34ch;
}

/* ------------------------------------------------------------------ analysis shots */

/*
 * Screenshots of the analysis page: the wide overview and one square tack detail. Same hairline
 * frame as the phone screens, so they read as captures of the real thing rather than as
 * illustrations.
 */
.shots {
  display: grid;
  gap: 28px;
  margin-top: 40px;
}

.shots figure {
  margin: 0;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.shots figcaption {
  font-size: 15px;
  color: var(--muted);
  margin-top: 12px;
}

@media (min-width: 700px) {
  /* Columns in the images' own proportions (1600x704 and 900x900), so both stand equally tall. */
  .shots {
    grid-template-columns: 2.27fr 1fr;
    gap: 28px;
  }
}

/* ------------------------------------------------------------------ install */

/* The two ways into the analysis, phone and bigger screen: as wide and as large as the steps
   below them, so they read as part of the same instructions rather than as body copy. */
.way {
  max-width: 52ch;
  font-size: 17px;
  color: var(--text);
  margin: 24px 0 0;
}

.way + .steps {
  margin-top: 12px;
}

.steps {
  list-style: none;
  counter-reset: s;
  margin: 32px 0;
  padding: 0;
  max-width: 52ch;
}

.steps li {
  counter-increment: s;
  border-top: 1px solid var(--line);
  padding: 20px 0 20px 52px;
  position: relative;
  font-size: 17px;
  color: var(--text);
}

.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

/* ------------------------------------------------------------------ who */

.who {
  display: grid;
  gap: 32px;
  margin-top: 36px;
}

.who h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.who p {
  font-size: 16px;
  max-width: 36ch;
}

/* ------------------------------------------------------------------ faq */

.faq {
  margin-top: 32px;
  max-width: 62ch;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  padding: 20px 34px 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 17px;
  font-size: 26px;
  color: var(--accent);
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  padding: 0 0 22px;
  font-size: 16px;
  max-width: 54ch;
}

/* ------------------------------------------------------------------ photo bands */

/*
 * Full bleed photographs sitting between sections, as a breather on a page that is otherwise
 * eight screens of dark type.
 *
 * Darkened with opacity over a black ground rather than with an overlay gradient: the page has no
 * gradients anywhere else, and a flat knock down keeps the photo behaving like part of the
 * instrument rather than like a hero image from somewhere else.
 *
 * They are <img loading="lazy"> and not CSS backgrounds on purpose. A background image cannot be
 * lazy loaded, and these three would otherwise be fetched on first paint on a phone.
 */
.photo {
  margin: 0;
  background: #000;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.photo img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.05);
  opacity: 0.7;
}

@media (min-width: 700px) {
  .photo img {
    height: 330px;
  }
}

/* ------------------------------------------------------------------ closing */

.closing {
  text-align: center;
  padding: 76px 0;
  position: relative;
  overflow: hidden;
  background: #000;
}

.closing .backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
}

.closing .backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05);
  opacity: 0.32;
}

.closing .wrap {
  position: relative;
}

.closing h2 {
  margin-bottom: 32px;
}

.closing .btn {
  max-width: 420px;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ footer */

footer.site {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  font-size: 15px;
  color: var(--muted);
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 16px;
}

footer.site a {
  color: var(--body);
  text-decoration: none;
}

footer.site a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------------ wider screens */

@media (min-width: 700px) {
  :root {
    --pad: 40px;
  }

  body {
    font-size: 18px;
  }

  section {
    padding: 96px 0;
  }

  .lede {
    font-size: 21px;
  }

  .btn {
    display: inline-block;
    width: auto;
    min-width: 320px;
  }

  .hero {
    padding: 72px 0 96px;
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 48px;
    align-items: center;
  }

  .hero > .wrap {
    padding: 0;
  }

  .hero-shot {
    margin: 0;
  }

  .screens {
    grid-template-columns: repeat(2, 1fr);
    gap: 56px 40px;
  }

  .who {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .facts li {
    font-size: 19px;
  }
}

@media (min-width: 1000px) {
  .screens {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 28px;
  }

  .screen img {
    max-width: 100%;
  }
}

/*
 * The hero is a grid at wide sizes, so it needs its own centred container rather than the shared
 * .wrap. Kept out of the media query above for readability.
 */
@media (min-width: 700px) {
  .hero {
    max-width: var(--page);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
  }
}

/* ================================================================== legal pages */

/*
 * Impressum, privacy and the manual share this stylesheet rather than carrying one of their own.
 * They are prose pages, so they take a narrower measure and a plainer scale.
 */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px var(--pad) 80px;
}

.doc h1 {
  font-size: clamp(32px, 9vw, 54px);
  margin-bottom: 16px;
}

.doc h2 {
  font-size: clamp(22px, 5vw, 30px);
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}

.doc h3 {
  margin-top: 32px;
  font-size: 19px;
  scroll-margin-top: 20px;
}

.doc p,
.doc li {
  color: var(--body);
}

.doc ul,
.doc ol {
  padding-left: 20px;
}

.doc li {
  margin-bottom: 8px;
}

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.doc address {
  font-style: normal;
  font-size: 19px;
  line-height: 1.7;
  color: var(--text);
}

.doc .small {
  font-size: 15px;
}

.doc .dim {
  color: var(--muted);
}

.doc .lead {
  font-size: 19px;
  color: var(--body);
  max-width: 52ch;
}

.doc .toc {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  margin: 32px 0;
}

.doc .toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

.doc .toc li {
  margin-bottom: 6px;
}

.doc .note {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 0 0 24px;
  max-width: none;
  color: var(--body);
}

.doc .note.warn {
  border-left-color: var(--warn);
}

.doc .note strong {
  color: var(--text);
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  margin-bottom: 26px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 420px;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--body);
}

th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.88em;
  color: var(--text);
  background: #10161e;
  border-radius: 3px;
  padding: 1px 5px;
}

pre {
  background: #0b1017;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.doc .steps li {
  color: var(--body);
}

.doc .steps strong {
  color: var(--text);
}

/* ------------------------------------------------------------------ contact form */

.form {
  margin-top: 32px;
}

.form fieldset {
  border: 0;
  margin: 0 0 26px;
  padding: 0;
}

.form legend,
.form label.field {
  display: block;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 10px;
  padding: 0;
}

.form .hint {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-left: 6px;
}

.form .choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--body);
}

.form input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  margin: 0;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: #0b1017;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px 14px;
  margin: 0 0 26px;
}

.form textarea {
  min-height: 180px;
  resize: vertical;
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

.form .btn {
  cursor: pointer;
}

@media (max-width: 699px) {
  th {
    white-space: normal;
  }
}
