/* TouchFX site. Colors are the app icon's night-blue screen and its yellow rings; headings use a condensed grotesque. */

@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/barlow-semi-condensed-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-semi-condensed-600.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #E6E7EF;
  --ink: #14162B;
  --muted: #4D5068;
  --line: #B9BBCF;
  --accent: #3B3FD0;
  --on-accent: #FFFFFF;
  --window: #F5F5FA;
  --window-raised: #FFFFFF;
  --window-line: #C9CBDB;
  --shadow: rgba(20, 22, 43, 0.22);
  --screen-top: #2A2D52;
  --screen-bottom: #0E1022;
  --screen-ink: #F3F4FB;

  --display: "Barlow Semi Condensed", "DIN Alternate", "Arial Narrow", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 34rem;
  --page: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1022;
    --ink: #F3F4FB;
    --muted: #9EA2BF;
    --line: #2C3050;
    --accent: #FFD60A;
    --on-accent: #14162B;
    --window: #1A1D38;
    --window-raised: #2A2E52;
    --window-line: #343861;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--text);
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
p { margin: 0; text-wrap: pretty; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { top: 0.75rem; }

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

/* The effects layer of demo.js: the whole page is the screen the app draws on. */
.fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2147483647;
}

/* Header */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font: 600 1.5rem/1 var(--display);
  letter-spacing: 0.01em;
}
.brand img { width: 2.25rem; height: 2.25rem; }
.masthead nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.masthead nav a { color: var(--ink); text-decoration: none; font-size: 1rem; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { text-decoration: underline; }

/* Intro: the instruction is the headline. */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(1.5rem, 3vw, 2.5rem);
}
.intro h1 {
  font-size: clamp(3.4rem, 9.4vw, 7.25rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.lede { font-size: 1.25rem; line-height: 1.45; }
.availability {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.availability strong { color: var(--ink); font-weight: 600; }

/* Stage: a mock display next to the app's menu. demo.js plays the effects over it. */

.stage { padding-bottom: clamp(3rem, 7vw, 6rem); }
.stage-prompt {
  margin-bottom: 1rem;
  color: var(--muted);
  font: 500 1.35rem/1.2 var(--display);
}
.stage-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  align-items: start;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.display {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(var(--screen-top), var(--screen-bottom));
  color: var(--screen-ink);
  box-shadow: 0 1.5rem 3.5rem var(--shadow), 0 0 0 1px var(--window-line);
  /* Dragging on the display draws a trail on touch screens instead of scrolling the page. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.display-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 1.7rem;
  padding-inline: 0.9rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
}
.bar-items { display: inline-flex; gap: 0.9rem; }
.bar-items i { width: 2.2rem; height: 0.4rem; border-radius: 0.2rem; background: rgba(243, 244, 251, 0.35); }
.bar-items i:first-child { width: 1.2rem; background: rgba(243, 244, 251, 0.6); }
.bar-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 1.3rem;
  border-radius: 0.35rem;
  background: rgba(243, 244, 251, 0.18);
}
.bar-icon svg { width: 1rem; height: 1rem; }

.mock-window {
  position: absolute;
  left: 9%;
  top: 19%;
  width: 56%;
  height: 62%;
  overflow: hidden;
  border: 1px solid var(--window-line);
  border-radius: 0.7rem;
  background: var(--window);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
}
.mock-bar {
  display: flex;
  align-items: center;
  height: 1.8rem;
  padding-inline: 0.7rem;
  border-bottom: 1px solid var(--window-line);
}
.lights { display: inline-flex; gap: 0.35rem; }
.lights i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--line); }
.mock-lines { display: grid; gap: 0.7rem; padding: 1.1rem 1.2rem; }
.mock-lines i { display: block; height: 0.55rem; border-radius: 0.28rem; background: var(--line); }
.mock-lines i:first-child { width: 45%; height: 0.9rem; background: var(--muted); }
.mock-lines i:nth-child(2) { width: 92%; }
.mock-lines i:nth-child(3) { width: 84%; }
.mock-lines i:nth-child(4) { width: 88%; }
.mock-lines i:nth-child(5) { width: 60%; }

.menu {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--window-line);
  border-radius: 0.9rem;
  background: var(--window);
  box-shadow: 0 1.5rem 3.5rem var(--shadow);
  font-size: 0.9375rem;
}
.menu fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.menu fieldset + fieldset { padding-top: 0.9rem; border-top: 1px solid var(--window-line); }
/* Floated, so the legend sits inside the fieldset instead of interrupting its top border. */
.menu legend { float: left; width: 100%; margin: 0 0 0.45rem; padding: 0; font: 600 0.875rem/1.5 var(--text); }
.choices { clear: both; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.choices label { position: relative; }
.choices input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choices span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--window-line);
  border-radius: 0.4rem;
}
.choices input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 43, 0.25);
}
.swatch-yellow { background: #FFD60A; }
.swatch-red { background: #FF453A; }
.swatch-blue { background: #0A84FF; }
.swatch-green { background: #30D158; }
.swatch-pink { background: #FF375F; }
.swatch-white { background: #FFFFFF; }
.play {
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 0.9375rem/1.3 var(--text);
  cursor: pointer;
}
.play:active { transform: translateY(1px); }
.stage-note { margin-top: 1rem; color: var(--muted); font-size: 0.9375rem; }

/* Facts, features, permissions */

.uses, .features, .permissions { padding-block: clamp(2.5rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2rem;
}
.facts h3 { font-size: 1.6rem; }
.facts p { margin-top: 0.6rem; color: var(--muted); }

.features-lede { max-width: var(--measure); margin-top: 1rem; color: var(--muted); }
.spec { columns: 3 17rem; column-gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 2.5rem; }
.spec section { break-inside: avoid; margin-bottom: 2.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.spec h3 { font-size: 1.6rem; }
.spec dl { margin: 0.4rem 0 0; }
.spec dt { margin-top: 0.9rem; font-weight: 600; }
.spec dd { margin: 0.2rem 0 0; color: var(--muted); }

.private { padding-block: clamp(2.5rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.private p { margin-top: 1rem; max-width: var(--measure); }
.private p + p { color: var(--muted); }

/* Footer */

.colophon {
  border-top: 1px solid var(--line);
  padding-block: 2rem 3rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.colophon .wrap { display: grid; gap: 1rem; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; }
.colophon a { color: var(--ink); }
.colophon p { max-width: 44rem; }

/* Text pages: privacy, support, not found. */

.page { padding-block: clamp(1.5rem, 5vw, 4rem) clamp(3rem, 8vw, 6rem); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.page h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); line-height: 0.98; }
.prose { max-width: 40rem; }
.prose .updated { margin-top: 0.75rem; color: var(--muted); font-size: 0.9375rem; }
.prose .summary { margin-top: 1.75rem; font-size: 1.25rem; line-height: 1.45; }
.prose h2 { font-size: 1.9rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.3rem; font-weight: 500; margin-top: 2rem; }
.prose p, .prose ul, .prose address { margin-top: 0.9rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.35rem; }
.prose address { font-style: normal; }
.prose .path { font-weight: 600; }

@media (max-width: 52rem) {
  .intro { grid-template-columns: minmax(0, 1fr); }
  .stage-body { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 30rem) {
  .masthead nav a.optional { display: none; }
  .display-bar { height: 1.4rem; }
  .bar-items i { width: 1.6rem; }
  .mock-lines { gap: 0.5rem; padding: 0.8rem 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
