/* Pixlo's site: blue crayon on white paper, like the app icon. The orange and the green are the
   guide's own: orange for where the subject is now, green for lined up. */
@font-face {
  font-family: "Gochi Hand";
  src: url("/assets/gochi-hand-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --wash: #f1f4ff;
  --ink: #0031e2;
  --text: #151b36;
  --muted: #4b5273;
  --orange: #ff9500;
  /* Orange dark enough to read as small text. */
  --orange-text: #c25a00;
  --green: #23a047;
  --hand: "Gochi Hand", "Comic Sans MS", "Marker Felt", cursive;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --page: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 1.0625rem/1.55 var(--body);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:focus-visible, .strip:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.defs { position: absolute; }

h1, h2, h3, .kicker, .button, .badge, .brand span { font-family: var(--hand); font-weight: 400; }
h1, h2 { color: var(--ink); margin: 0; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 7.4vw, 4.9rem); }
h2 { font-size: clamp(2rem, 5vw, 3.1rem); }
h3 { font-size: 1.5rem; line-height: 1.15; margin: 0 0 6px; color: var(--ink); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); margin: 18px 0 0; max-width: 34em; }
.lead.narrow { max-width: 30em; }
.small { font-size: 0.95rem; color: var(--muted); margin: 0; }
.kicker { color: var(--orange-text); font-size: 1.5rem; line-height: 1.2; margin: 0 0 6px; }

/* Hand-drawn outlines and underlines, drawn by doodle.js over whatever carries data-doodle. */
[data-doodle] { position: relative; }
.doodle-svg {
  position: absolute;
  left: -8px;
  top: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  max-width: none;
  overflow: visible;
  pointer-events: none;
  filter: url(#crayon);
}
.doodle-svg path {
  fill: none;
  stroke: var(--doodle, var(--ink));
  stroke-width: var(--doodle-width, 2.6);
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-doodle="box"]:not(.doodled) { box-shadow: 0 0 0 2.5px var(--ink); }
svg[data-mini], svg[data-diagram] { display: block; overflow: visible; filter: url(#crayon); }
html:not(.doodles) svg[data-mini], html:not(.doodles) svg[data-diagram] { display: none; }
svg .ink { stroke: var(--ink); }
svg .guide { stroke: rgba(0, 49, 226, 0.34); stroke-width: 1.7; }
svg .drawn { stroke: var(--ink); stroke-width: 2.3; }
svg .subject { fill: var(--orange); stroke: none; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(56px, 9vw, 112px) 0; }
.band { background: var(--wash); }

/* Top bar */
.top {
  max-width: var(--page);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; }
.brand span { font-size: 2rem; line-height: 1; padding-top: 4px; }
.top nav { display: none; gap: 26px; }
.top nav a, footer nav a { text-decoration: none; color: var(--text); }
.top nav a:hover, footer nav a:hover { color: var(--ink); text-decoration: underline; }
.top nav a.get { color: var(--ink); font-weight: 600; }
@media (min-width: 760px) { .top nav { display: flex; } }

/* Hero */
.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) var(--gutter) clamp(56px, 8vw, 96px);
  display: grid;
  gap: 40px;
  grid-template-areas: "text" "phone" "legend";
}
.hero-text { grid-area: text; }
.hero-phone { grid-area: phone; }
.marked { display: inline-block; --doodle: var(--orange); --doodle-width: 3.4; }
.cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.button {
  display: inline-block;
  font-size: 1.45rem;
  line-height: 1;
  padding: 15px 22px 12px;
  text-decoration: none;
  border-radius: 6px;
}
.button.primary { color: #fff; background: var(--ink); transition: transform 0.15s ease-out; }
.button.primary:hover { transform: rotate(-1.2deg); }
.legend { grid-area: legend; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
.legend li { display: flex; align-items: center; gap: 12px; }
.badge {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  padding-top: 3px;
  color: var(--ink);
  background: #fff;
  border-radius: 50%;
  --doodle-width: 2.2;
}
.badge.on-phone { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }
/* The numbers sit over the screen but aren't cut off by its round corners. */
.hero .phone .screen { overflow: visible; }
.hero .phone img { border-radius: 13.8% / 6.4%; }
.hero-phone { display: grid; justify-items: center; align-self: center; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; grid-template-areas: "text phone" "legend phone"; gap: 36px 56px; }
  .hero-text { align-self: end; }
}

/* A screenshot in a phone: a dark body with round corners, the screen inside it, and the buttons on
   its sides. The corner radii are shares of the width over shares of the height, which makes them
   round for a screenshot of this shape. */
.phone {
  position: relative;
  margin: 0;
  width: min(100%, 300px);
  padding: 3%;
  background: #101013;
  border-radius: 16% / 7.6%;
  box-shadow: 0 0 0 1.5px #55555c, inset 0 0 0 1.5px #2c2c31, 0 22px 40px -22px rgba(10, 25, 90, 0.5);
}
.phone .screen { position: relative; overflow: hidden; border-radius: 13.8% / 6.4%; background: #000; }
.phone img { width: 100%; }
.phone::before, .phone::after {
  content: "";
  position: absolute;
  width: 1.1%;
  border-radius: 2px;
  background: #3a3a40;
}
/* The action button and the two volume buttons on the left, the side button on the right. */
.phone::before {
  left: -1.3%;
  top: 17%;
  height: 21%;
  background: linear-gradient(#3a3a40 0 16%, transparent 16% 32%, #3a3a40 32% 62%, transparent 62% 70%, #3a3a40 70%);
}
.phone::after { right: -1.3%; top: 27%; height: 11%; }
.tilt-left { transform: rotate(-2.2deg); }
.tilt-right { transform: rotate(2.2deg); }
.hero .phone { width: min(74vw, 310px); }

/* How it works */
.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 34px; }
.steps li { display: grid; grid-template-columns: 104px 1fr; gap: 6px 22px; align-items: center; }
.steps svg { grid-row: span 2; width: 104px; }
.steps h3 { align-self: end; }
.steps p { align-self: start; margin: 0; color: var(--muted); }
@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .steps li { grid-template-columns: 1fr; justify-items: center; align-content: start; text-align: center; gap: 0; }
  .steps svg { grid-row: auto; width: 150px; margin-bottom: 22px; }
  .steps p { max-width: 19em; }
}

/* Compositions */
.sub { font-size: 1.9rem; margin: 64px 0 0; }
.tiles { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
.tiles svg { width: 78px; margin-bottom: 12px; }
.tiles h3 { font-size: 1.3rem; }
.tiles p { margin: 0; font-size: 0.95rem; color: var(--muted); }
@media (min-width: 620px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.phones { margin: 72px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 4vw, 48px); max-width: 860px; justify-items: center; align-items: center; }
.phones .phone:nth-child(2) { transform: translateY(-14px); }

/* The photo, and privacy */
.two { display: grid; gap: 48px; align-items: start; }
@media (min-width: 880px) { .two { grid-template-columns: 1.1fr 0.9fr; gap: 64px; } }
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; top: -5px; font: 1.7rem/1.2 var(--hand); color: var(--green); }
.note { padding: 30px 28px 14px; background: var(--paper); }
.note h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 14px; }

/* The intro pages, side by side */
.strip {
  margin: 36px calc(-1 * var(--gutter)) 0;
  padding: 18px var(--gutter) 26px;
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.strip .phone { flex: none; width: 196px; scroll-snap-align: center; }
@media (min-width: 1180px) { .strip { justify-content: center; overflow: visible; } }

/* Closing */
.closing { text-align: center; }
.closing img { width: min(64vw, 300px); margin: 0 auto 10px; }
.closing .cta { justify-content: center; flex-direction: column; }

footer { padding: 0 0 36px; }
.rule { height: 8px; max-width: calc(var(--page) - 2 * var(--gutter)); margin: 0 var(--gutter) 26px; }
@media (min-width: 1120px) { .rule { margin-inline: auto; } }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.95rem; }
.foot nav { display: flex; gap: 22px; }

/* The privacy and support pages */
.page { max-width: 720px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) var(--gutter) 72px; }
.page h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 8px; }
.page h2 { font-size: 1.8rem; margin: 40px 0 10px; }
.page h3 { margin-top: 28px; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 8px; }
.page .date { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button.primary:hover { transform: none; }
}
