/* Hyperstatic homepage and 404. Product pages keep their own stylesheets. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/home/fonts/archivo-latin-ext-wdth.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/home/fonts/archivo-latin-wdth.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 {
  color-scheme: light;
  --paper: #e6e8eb;
  --ink: #1e1e1d;
  --signal: #fe451b;
  --muted: #555d67;
  --line: rgba(30, 30, 29, 0.17);
  --pad: clamp(20px, 5vw, 72px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(30, 30, 29, 0.45);
}

a:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--signal);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Opening */

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 34px);
  padding-top: 26px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a {
  text-decoration-line: none;
}

.site-nav a:hover {
  text-decoration-line: underline;
}

.opening {
  padding-block: clamp(44px, 9vh, 104px) clamp(56px, 9vh, 96px);
}

.wordmark {
  display: block;
  width: clamp(250px, 70vw, 660px);
  margin: 0;
}

/* The lettering file has a little space around it; pull it back to the text edge. */
.wordmark img {
  width: 100%;
  margin-left: -2.5%;
}

.lede {
  margin: clamp(14px, 2.2vw, 26px) 0 0;
  font-size: clamp(1.7rem, 3.5vw, 2.9rem);
  font-weight: 500;
  font-stretch: 90%;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Apps */

.app {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 68px);
  border-top: 1px solid var(--line);
}

/* An offset outline behind each icon, the same slip of registration as the lettering.
   It lines up when you point at the app. */
.icon {
  position: relative;
  display: block;
  width: 104px;
  height: 104px;
  isolation: isolate;
}

.icon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid var(--signal);
  border-radius: 22.5%;
  transform: translateX(-7px);
  transition: transform 0.22s ease-out;
}

.app:hover .icon::before,
.app:focus-within .icon::before {
  transform: translateX(0);
}

.icon img {
  width: 100%;
  height: 100%;
  border-radius: 22.5%;
}

.app h3 {
  margin: 26px 0 0;
  font-size: clamp(2rem, 3.3vw, 2.75rem);
  font-weight: 640;
  font-stretch: 88%;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.platform {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.about-app {
  max-width: 36ch;
  margin: 18px 0 0;
  font-size: 1.125rem;
  line-height: 1.5;
}

.store {
  display: inline-block;
  margin-top: 26px;
  padding: 13px 22px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration-line: none;
}

.store:hover {
  background: #000;
  text-decoration-line: none;
}

.store:focus-visible {
  border-radius: 999px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
  width: 100%;
  max-width: 660px;
  margin-left: auto;
}

.shots img {
  width: 100%;
  border-radius: clamp(10px, 1.3vw, 18px);
  box-shadow: 0 0 0 1px rgba(30, 30, 29, 0.1);
}

/* Lower sections share the apps' two columns: heading left, content right. */

.band {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 5vw, 72px);
  padding-block: clamp(40px, 6vw, 68px);
  border-top: 1px solid var(--line);
}

.band h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 640;
  font-stretch: 88%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.band p {
  max-width: 54ch;
  margin: 0 0 1em;
}

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

.help {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-size: 1rem;
}

.help th,
.help td {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.help tr:last-child th,
.help tr:last-child td {
  border-bottom: 1px solid var(--line);
}

.help th {
  width: 34%;
  padding-right: 16px;
  font-weight: 600;
}

.help td {
  padding-right: 16px;
}

.help td:last-child {
  padding-right: 0;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-foot p {
  margin: 0;
}

/* 404 */

.lost {
  padding-block: clamp(44px, 9vh, 104px);
}

.lost .wordmark {
  width: clamp(200px, 30vw, 320px);
}

.lost h1 {
  max-width: 16ch;
  margin: clamp(40px, 8vh, 80px) 0 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 640;
  font-stretch: 88%;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.lost p {
  max-width: 44ch;
  margin: 20px 0 0;
  font-size: 1.125rem;
}

.lost .links {
  margin-top: 26px;
  font-size: 1rem;
  align-items: center;
}

.lost .store {
  margin-top: 0;
}

@media (max-width: 820px) {
  .app,
  .band {
    grid-template-columns: minmax(0, 1fr);
  }

  .icon {
    width: 88px;
    height: 88px;
  }

  .app h3 {
    margin-top: 22px;
  }

  /* Screenshots become a strip you can swipe, as on the App Store. */
  .shots {
    display: flex;
    width: auto;
    max-width: none;
    margin-inline: calc(-1 * var(--pad));
    padding: 2px var(--pad);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }

  .shots::-webkit-scrollbar {
    display: none;
  }

  .shots img {
    flex: 0 0 46%;
    width: 46%;
    scroll-snap-align: start;
    border-radius: 14px;
  }

  .help {
    margin-top: 20px;
  }

  .help th {
    width: auto;
  }
}

@media (max-width: 560px) {
  /* Each app's name sits on its own line with its links underneath. */
  .help tr {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 20px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }

  .help tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  .help th,
  .help td,
  .help tr:last-child th,
  .help tr:last-child td {
    padding: 0;
    border: 0;
  }

  .help th {
    flex: 0 0 100%;
  }

  .help td:empty {
    display: none;
  }
}

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

  .icon::before {
    transition: none;
  }
}
