/* Shoebox: the app's own palette, on the web.
   Dark kraft ground, cream label stock for anything carrying information,
   one Nike-box red spent once per page, typewriter figures for numbers. */

/* The two families, served from this host.

   They used to be loaded from Google's font service, which meant every
   visitor to every page -- including the privacy policy, which names a
   complete list of who receives their data -- made a request to Google
   carrying their IP address and Referer. The policy was wrong, and a page
   that says who it shares you with has to be right about it. Nothing here
   reaches a third party now.

   These are TrueType, not woff2: the families are vendored in this
   repository as TTF and there is no woff2 compressor in the toolchain, so
   converting here would mean adding one. truetype costs roughly 30-40%
   more bytes than woff2 over the wire before gzip; the five faces are
   about 410 KB on disk, Caddy compresses them, and they are cached after
   the first page. Worth revisiting if a build step ever appears.

   Static instances, so Bricolage Grotesque's `opsz` axis is fixed at its
   default rather than tracking the rendered size -- headings are very
   slightly less open than Google's variable build served them.

   Flat here at the root of the lander rather than in a fonts/ subdirectory,
   which is not tidiness. The helper that installs the lander on the droplet
   is installed by hand and the copy running there cannot copy a directory,
   so a subdirectory would fail every deploy until somebody SSHed in to
   replace it. See docs/deploy.md. The repository copy of the helper handles
   nested directories; this does not depend on that having been installed.

   Licensed under the SIL Open Font License; the full text of each is
   beside the files, at /BricolageGrotesque-OFL.txt and
   /CourierPrime-OFL.txt. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/BricolageGrotesque_400Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/BricolageGrotesque_700Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/BricolageGrotesque_800ExtraBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/CourierPrime_400Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/CourierPrime_700Bold.ttf') format('truetype');
}

:root {
  color-scheme: dark;
  --ink: #151210;
  --surface: #211c18;
  --raised: #2b2622;
  --line: #332c26;
  --paper: #f0e9dc;
  --dim: #a2977f;
  --faint: #6b6154;
  --accent: #c8232c;
  --gold: #c8a44d;
  --measure: 34rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font:
    400 17px/1.65 'Bricolage Grotesque',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* Figures, codes and labels are monospaced, exactly as they are in the app:
   the stock code on a box end is typewritten, so ours are too. */
.mono,
.label,
.stat b,
code {
  font-family: 'Courier Prime', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

.label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.6rem;
}

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.6rem, 4.4vw, 2.2rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

a {
  color: var(--paper);
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

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

/* ---- header ---- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.bar .wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-block: 0.8rem;
}

.bar img {
  width: 30px;
  height: 30px;
  display: block;
}

.bar strong {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.bar nav {
  margin-left: auto;
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.bar nav a {
  color: var(--dim);
  text-decoration: none;
}

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

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

.hero {
  padding-block: clamp(3rem, 9vw, 6rem) 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

/* The phone beside the headline earns its place only when there is room
   for it; below that it would just push the invite button off the fold. */
.hero-shot {
  display: none;
}

@media (min-width: 62rem) {
  .hero {
    grid-template-columns: 1fr 17rem;
    gap: 4.5rem;
  }
  .hero-shot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
  }
}

.hero img.mark {
  width: clamp(104px, 20vw, 148px);
  height: auto;
  display: block;
  margin-bottom: 2rem;
}

.lede {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  color: var(--dim);
  margin-top: 1.2rem;
  max-width: 38rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.pill i {
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
  display: block;
}

.cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 2px;
}

.cta:hover {
  color: var(--paper);
  filter: brightness(1.08);
}

.after-cta {
  margin-top: 0.9rem;
  font-size: 0.86rem;
  color: var(--faint);
}

/* ---- a row of phones ---- */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.5rem;
  padding-block: 2rem 1rem;
}

.shots figure {
  margin: 0;
}

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

.shots figcaption {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: var(--faint);
}

/* ---- features ---- */

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: clamp(3rem, 8vw, 5rem) 0;
}

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 4rem);
}

@media (min-width: 52rem) {
  .feature {
    grid-template-columns: 1fr 19rem;
    gap: 4rem;
  }
  /* Flipped, the phone moves to the left -- so the narrow track has to move
     with it. Reordering alone left the prose in a 19rem column, which is
     half the measure it is set for. */
  .feature.flip {
    grid-template-columns: 19rem 1fr;
  }
  .feature.flip > div {
    order: 2;
  }
  .feature.flip > img {
    order: 1;
  }
}

.feature img {
  width: 100%;
  max-width: 19rem;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  padding-block: 1rem 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.3rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--dim);
}

/* ---- prose pages ---- */

.prose {
  padding-block: clamp(2.5rem, 7vw, 4rem);
}

.prose h1 {
  font-size: clamp(2.2rem, 7vw, 3rem);
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.3rem;
  margin-top: 2.4rem;
  margin-bottom: 0.7rem;
}

.prose p,
.prose li {
  color: var(--dim);
}

.prose strong {
  color: var(--paper);
}

.prose ol,
.prose ul {
  max-width: var(--measure);
  padding-left: 1.2rem;
}

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

footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 8vw, 5rem);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-block: 2rem 3rem;
  color: var(--faint);
  font-size: 0.88rem;
}

footer a {
  color: var(--faint);
}

footer .spacer {
  margin-left: auto;
}

/* ---- the waitlist form ---- */

/* `display: grid` beats the user agent's `[hidden] { display: none }`, so
   hiding the form after a successful join did nothing until this existed:
   the confirmation appeared underneath a form still asking to be filled
   in. Any element given a display here needs the same line. */
.join[hidden],
.joined[hidden] {
  display: none;
}

.join {
  display: grid;
  gap: 0.4rem;
  max-width: 26rem;
  margin-top: 1.8rem;
}

.join label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 0.7rem;
}

.join label span {
  letter-spacing: 0.08em;
  color: var(--faint);
}

.join input {
  font: inherit;
  color: var(--paper);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}

.join input::placeholder {
  color: var(--faint);
}

.join input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.join button {
  margin-top: 1.3rem;
  justify-self: start;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.join button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* The honeypot. Off-screen rather than display:none, because a bot that
   reads styles skips what is not rendered -- and aria-hidden plus a
   negative tabindex keep it away from anybody using the page properly. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.joined {
  margin-top: 1.8rem;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--gold);
  background: var(--surface);
  max-width: 26rem;
}

/* The date a policy page was last changed. Quiet, but it has to be
   findable: a policy with no date is a policy nobody can rely on. */
.updated {
  color: var(--faint);
  font-size: 0.82rem;
  margin-top: -0.8rem;
  margin-bottom: 2rem;
}
