/* Aftergleam website.
   One strong colour, the app's green, kept for the hero, buttons and links. Everything else is
   warm paper and a washed-out lilac. Erewhon for display type, Figtree for everything else. */

@font-face {
  font-family: "Erewhon";
  src: url("fonts/erewhon-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #096c46;
  --green-hover: #0a7a50;
  --green-ink: #0b3b28;
  --on-green: #f8f1e7;
  --on-green-soft: #cfe0c3;
  /* The pale lilac as it appears on green. Not a theme colour: the hero is green in both
     themes, so what sits on it must not change with them. */
  --pale: #ece5ee;
  --pale-deep: #ddd1e3;

  --lilac: #ece5ee;
  --lilac-deep: #ddd1e3;
  --lilac-ink: #4a3f55;

  --bg: #f8f3ec;
  --bg-alt: #f2ebe2;
  --card: #fffcf8;
  --ink: #1b2620;
  --muted: #5c5a52;
  --line: #e4dad0;
  --accent: #096c46;
  --field-edge: #857b8c;
  --header: rgba(248, 243, 236, 0.86);
  --shadow: 0 1px 2px rgba(40, 30, 40, 0.05), 0 8px 24px -8px rgba(40, 30, 40, 0.14),
    0 28px 60px -28px rgba(40, 30, 40, 0.24);

  --serif: "Erewhon", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 74rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 1.75rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lilac: #29252c;
    --lilac-deep: #3a3440;
    --lilac-ink: #d6cbdc;
    --bg: #16140f;
    --bg-alt: #1c1a15;
    --card: #221f1a;
    --ink: #ece5d9;
    --muted: #b9b09f;
    --line: #36322b;
    --accent: #9dbb86;
    --field-edge: #8a8093;
    --header: rgba(22, 20, 15, 0.86);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

svg {
  fill: currentColor;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem;
}

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

.nowrap {
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 4rem;
}

.brand img {
  height: 1.55rem;
  width: auto;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.header-github {
  display: none;
  color: var(--ink);
}

@media (max-width: 48rem) {
  .site-nav {
    display: none;
  }

  .header-github {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-left: auto;
  }

  .header-github .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
}

/* ---------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.6rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  font: 650 0.97rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 6px 16px -8px rgba(5, 60, 38, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.button:active {
  transform: translateY(0);
}

/* On the green hero, the button is the pale one. */
.button.soft {
  background: var(--pale);
  color: var(--green-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 24px -12px rgba(0, 0, 0, 0.5);
}

.button.soft:hover {
  background: #f6f1f7;
}

/* ---------------------------------------------------------------- sign-up form */

.signup {
  max-width: 34rem;
}

.signup-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 1.2rem;
  background: rgba(255, 252, 248, 0.1);
  border: 1px solid rgba(248, 241, 231, 0.22);
}

.signup .field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

.signup .field .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1.2rem;
  height: 1.2rem;
  transform: translateY(-50%);
  color: #6f6a61;
  pointer-events: none;
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 3.3rem;
  padding: 0 1rem 0 2.9rem;
  border: 0;
  border-radius: 0.9rem;
  background: #fffcf8;
  color: #1b2620;
  font: 500 1.05rem var(--sans);
}

/* Full strength in every browser: Firefox otherwise fades placeholders further. */
.signup input[type="email"]::placeholder {
  color: #6f6a61;
  opacity: 1;
}

.signup input[type="email"]:focus-visible {
  outline: 3px solid var(--pale-deep);
  outline-offset: 0;
}

.signup .button {
  height: 3.3rem;
  border-radius: 0.9rem;
  padding: 0 1.5rem;
  font-size: 1.05rem;
}

.signup .trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup-note {
  margin: 0.8rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--on-green-soft);
}

.signup-note a {
  color: inherit;
}

.signup-status {
  margin: 0.8rem 0 0;
  font-weight: 600;
}

.signup-status:empty {
  display: none;
}

.signup.is-busy .button {
  opacity: 0.7;
  pointer-events: none;
}

.signup.is-done .signup-row,
.signup.is-done .signup-note {
  display: none;
}

.signup.is-done .signup-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.signup.is-done .signup-status::before {
  content: "";
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  border-radius: 50%;
  background-color: currentColor;
  -webkit-mask: url("img/check.svg") center / 70% no-repeat;
  mask: url("img/check.svg") center / 70% no-repeat;
}

/* The same form on a light background: a plainly bordered field and the button beside it. */
.signup.light .signup-row {
  padding: 0;
  background: none;
  border: 0;
}

.signup.light input[type="email"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0 0 1.5px var(--field-edge) inset, 0 1px 2px rgba(40, 30, 40, 0.06);
}

.signup.light input[type="email"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}

.signup.light .field .icon {
  color: var(--muted);
}

.signup.light input[type="email"]::placeholder {
  color: var(--muted);
}

.signup.light .signup-note {
  color: var(--muted);
}

.signup.light .signup-status {
  color: var(--accent);
}

.center .signup {
  margin-left: auto;
  margin-right: auto;
}

.center .signup.is-done .signup-status {
  justify-content: center;
}

@media (max-width: 30rem) {
  .signup-row {
    flex-direction: column;
  }

  .signup .field {
    flex: none;
    width: 100%;
  }

  .signup .button {
    width: 100%;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60rem 40rem at 78% 30%, rgba(24, 150, 102, 0.5), transparent 60%),
    radial-gradient(40rem 30rem at 10% 110%, rgba(3, 50, 32, 0.55), transparent 70%),
    var(--green);
  color: var(--on-green);
}

.hero :focus-visible {
  outline-color: var(--pale);
}

.hero .container {
  display: grid;
  gap: 2.5rem;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero .container {
    grid-template-columns: 1.05fr 1fr;
  }
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.4rem;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.08);
  border: 1px solid rgba(248, 241, 231, 0.2);
  font-size: 0.9rem;
  font-weight: 600;
}

.eyebrow .store-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

@media (max-width: 26rem) {
  .eyebrow {
    font-size: 0.8rem;
    gap: 0.35rem;
    padding-right: 0.7rem;
  }
}

.eyebrow .icon {
  width: 0.95rem;
  height: 0.95rem;
  opacity: 0.9;
}

.eyebrow .pulse {
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.2rem;
  border-radius: 50%;
  background: var(--pale);
  box-shadow: 0 0 0 0 rgba(236, 229, 238, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70%,
  100% {
    box-shadow: 0 0 0 0.55rem rgba(236, 229, 238, 0);
  }
}

.hero h1 {
  font-size: clamp(2.8rem, 1.5rem + 5vw, 5.1rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 1.4rem;
}

/* The highlighter from the store graphics, in a paler ink. */
.marker {
  padding: 0 0.12em 0.04em;
  margin: 0 -0.04em;
  border-radius: 0.14em;
  background: var(--pale) linear-gradient(100deg, #efe8f1, var(--pale-deep));
  color: var(--green-ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  max-width: 33rem;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.5;
  color: #e6efdd;
  margin-bottom: 2rem;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.93rem;
  color: var(--on-green-soft);
}

.trust li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.trust a {
  color: inherit;
}

.trust .icon {
  color: var(--pale);
  width: 0.95em;
  height: 0.95em;
}

/* The stage: a phone, the stream of papers behind it, and the gleam. */

.stage {
  position: relative;
  min-height: 34rem;
  display: grid;
  place-items: center;
  perspective: 1600px;
}

@media (max-width: 59.99rem) {
  .stage {
    min-height: 30rem;
  }
}

.stream {
  position: absolute;
  inset: -25% -30% -25% -10%;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  transform: rotate(-12deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
  pointer-events: none;
}

.track {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: drift 60s linear infinite;
}

.track:nth-child(2) {
  animation-duration: 48s;
  margin-top: -6rem;
}

.track:nth-child(3) {
  animation-duration: 70s;
  margin-top: -3rem;
}

.track:nth-child(4) {
  animation-duration: 54s;
  margin-top: -9rem;
}

@keyframes drift {
  to {
    transform: translateY(-50%);
  }
}

.sheet {
  width: 7.5rem;
  height: 9.6rem;
  flex: none;
  padding: 0.9rem 0.75rem;
  border-radius: 0.5rem;
  background: #3f8c68;
  opacity: 0.5;
}

.sheet i {
  display: block;
  height: 0.3rem;
  margin-bottom: 0.45rem;
  border-radius: 1rem;
  background: #5c9e7e;
}

.sheet i:nth-child(1) {
  width: 80%;
  height: 0.5rem;
  margin-bottom: 0.7rem;
}

.sheet i:nth-child(2) {
  width: 92%;
}

.sheet i:nth-child(3) {
  width: 70%;
}

.sheet i:nth-child(4) {
  width: 86%;
}

.sheet i:nth-child(5) {
  width: 58%;
}

/* The few that are worth it. */
.sheet.pick {
  background: #f8f3ec;
  opacity: 1;
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.5);
}

.sheet.pick i {
  background: #e2d9d0;
}

.sheet.pick i:nth-child(1) {
  background: #b8a5c6;
}

.phone-wrap {
  position: relative;
  z-index: 2;
  width: min(18.5rem, 58vw);
}

/* The rounded halos behind the phone in the feature graphic. */
.phone-wrap::before,
.phone-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.2rem;
  border-radius: 4rem;
  background: rgba(20, 130, 88, 0.35);
  animation: breathe 7s ease-in-out infinite;
}

.phone-wrap::after {
  inset: -4.4rem;
  border-radius: 5.2rem;
  background: rgba(20, 130, 88, 0.2);
  animation-delay: -3.5s;
}

@keyframes breathe {
  50% {
    transform: scale(1.03);
    opacity: 0.75;
  }
}

.phone {
  --rx: 5deg;
  --ry: -14deg;
  position: relative;
  aspect-ratio: 540 / 1204;
  padding: 0.6rem;
  border-radius: 2.8rem;
  background: linear-gradient(145deg, #2a2a25, #0e0e0c 55%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 50px 80px -30px rgba(0, 25, 15, 0.8),
    0 25px 40px -25px rgba(0, 0, 0, 0.6);
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(1.5deg);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 2.25rem;
  background: #16140f;
}

.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: screens 20s infinite;
}

.screen img:first-child {
  opacity: 1;
}

.screen img:nth-child(2) {
  animation-delay: 5s;
}

.screen img:nth-child(3) {
  animation-delay: 10s;
}

.screen img:nth-child(4) {
  animation-delay: 15s;
}

@keyframes screens {
  0% {
    opacity: 0;
    transform: scale(1.02);
  }
  3%,
  25% {
    opacity: 1;
    transform: scale(1);
  }
  28%,
  100% {
    opacity: 0;
  }
}

/* The one gleam: it grows in with a quarter turn, then catches the light now and then. */
.gleam {
  position: absolute;
  z-index: 3;
  top: -1.4rem;
  right: -1.6rem;
  width: 4rem;
  height: 4rem;
  color: #f3eef5;
  filter: drop-shadow(0 0 16px rgba(243, 238, 245, 0.55));
  animation: gleam-in 1.4s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    twinkle 7s 2s ease-in-out infinite;
}

@keyframes gleam-in {
  from {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes twinkle {
  0%,
  80%,
  100% {
    transform: scale(1) rotate(0);
  }
  88% {
    transform: scale(1.2) rotate(45deg);
  }
  94% {
    transform: scale(0.95) rotate(90deg);
  }
}

/* One real reason line, floating by the phone. */
.float-chip {
  position: absolute;
  z-index: 3;
  left: -2.5rem;
  bottom: 16%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  border-radius: 0.9rem;
  background: #fffcf8;
  color: #1b2620;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.55);
  animation: bob 7s ease-in-out infinite;
}

.float-chip .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(9, 108, 70, 0.15);
}

@keyframes bob {
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 30rem) {
  .float-chip {
    left: -1.2rem;
    font-size: 0.78rem;
  }
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head p {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.kicker {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--lilac-ink);
}

/* Sources strip */

.sources {
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
}

.sources p {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.sources ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sources a {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.sources a:hover {
  opacity: 1;
  color: var(--accent);
}

/* Problem, with the photograph */

.split {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.photo {
  position: relative;
  margin: 0 0 2rem;
}

.photo .main {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.photo .ui {
  position: absolute;
  right: -0.5rem;
  bottom: -2rem;
  width: 64%;
  border-radius: 1.1rem;
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.55);
}

@media (min-width: 56rem) {
  .photo .ui {
    right: -2.5rem;
  }
}

.big-copy h2 {
  margin-bottom: 1.4rem;
}

.big-copy p {
  font-size: 1.2rem;
  color: var(--muted);
}

/* Steps */

.steps {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 56rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  counter-increment: step;
}

.step-text {
  padding: 1.8rem 1.8rem 1.4rem;
}

.step-text::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-weight: 750;
}

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

.step p {
  margin: 0;
  color: var(--muted);
}

.step-shot {
  margin-top: auto;
  padding: 0 1.4rem;
}

.step-shot img {
  border-radius: 1.1rem 1.1rem 0 0;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}

/* Feature grid */

.bento {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile.full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
  }

  .tile.wide {
    grid-column: span 2;
  }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 16rem;
  padding: 1.9rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile:hover {
  transform: translateY(-4px);
}

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

.tile p {
  margin: 0;
  color: var(--muted);
}

.tile a {
  font-weight: 600;
}

.tile .more {
  margin-top: auto;
  padding-top: 1.4rem;
}

.tile .shot {
  margin: auto -1.9rem -1.9rem;
  padding: 1.6rem 1.9rem 0;
}

.tile .shot img {
  border-radius: 1rem 1rem 0 0;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}

@media (min-width: 48rem) {
  .tile.side {
    flex-direction: row;
    align-items: stretch;
    gap: 3rem;
    min-height: 0;
  }

  .tile.side .tile-text {
    flex: 1;
    align-self: center;
    max-width: 30rem;
  }

  .tile.side .shot {
    flex: 1;
    align-self: flex-end;
    max-width: 28rem;
    margin: 0 0 -1.9rem auto;
    padding: 0;
  }

  .tile.side .shot img {
    max-height: 17rem;
    width: 100%;
    object-fit: cover;
    object-position: top;
  }
}

.tile.dark {
  background: #1d1b16;
  color: #ece5d9;
}

.tile.dark p {
  color: #b9b09f;
}

.tile.dark a {
  color: #c9dcb8;
}

.tile.soft {
  background: var(--lilac);
}

.tile .mark {
  width: 5.5rem;
  height: 5.5rem;
  margin: auto 0 0 auto;
  border-radius: 1.3rem;
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.35);
  transform: rotate(-6deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile:hover .mark {
  transform: rotate(0deg) scale(1.05);
}

.tile .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.tile .links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tile .links .icon {
  width: 1.05rem;
  height: 1.05rem;
}

/* The reason lines, cycling as they would on a morning's cards. */
.reasons {
  position: relative;
  height: 3.2rem;
  margin: 2.2rem 0 0;
}

.reasons span {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 0.8rem;
  background: #2c2923;
  color: #b9d3a4;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  animation: reason 16s infinite;
}

.reasons span::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #9dbb86;
}

.reasons span:nth-child(1) {
  opacity: 1;
}

.reasons span:nth-child(2) {
  animation-delay: 4s;
}

.reasons span:nth-child(3) {
  animation-delay: 8s;
}

.reasons span:nth-child(4) {
  animation-delay: 12s;
}

@keyframes reason {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  4%,
  22% {
    opacity: 1;
    transform: none;
  }
  26%,
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@media (max-width: 30rem) {
  .reasons span {
    font-size: 0.85rem;
  }
}

.check-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
}

.check-list .icon {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--accent);
}

.files {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1.8rem;
}

.files span {
  display: grid;
  place-items: end start;
  width: 4.2rem;
  height: 5.2rem;
  padding: 0.55rem;
  border-radius: 0.5rem 1.1rem 0.5rem 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  font-weight: 750;
  font-size: 0.85rem;
  color: var(--lilac-ink);
}

.files span:nth-child(2) {
  transform: rotate(5deg);
}

.files .arrow {
  width: 1.6rem;
  height: 1.6rem;
  margin: 0 0.2rem 1.8rem;
  color: var(--muted);
}

.files .heart {
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 1.4rem;
  color: var(--accent);
}

/* FAQ */

.faq {
  display: grid;
  gap: 2rem 4rem;
}

@media (min-width: 56rem) {
  .faq {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .faq .section-head {
    position: sticky;
    top: 6rem;
    align-self: start;
  }
}

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

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

.faq summary {
  position: relative;
  display: block;
  padding: 1.3rem 2.5rem 1.3rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 1.1rem;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq summary:hover {
  color: var(--accent);
}

.faq details p {
  margin: -0.3rem 0 1.4rem;
  color: var(--muted);
  max-width: 40rem;
}

/* Closing call: a lilac panel on paper. */

.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4rem);
  border-radius: 2.25rem;
  background:
    radial-gradient(40rem 20rem at 50% -10%, rgba(255, 255, 255, 0.55), transparent 70%),
    var(--lilac);
  box-shadow: var(--shadow);
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .panel {
    background: var(--lilac);
  }
}

.panel h2 {
  margin-bottom: 1rem;
}

.panel .lede {
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
}

.store {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 11.5rem;
  padding: 0.6rem 1.1rem 0.6rem 0.95rem;
  border-radius: 0.9rem;
  background: #1d1b16;
  color: #f3ede4;
  text-align: left;
  text-decoration: none;
  line-height: 1.15;
}

a.store:hover {
  background: #2a2721;
  text-decoration: none;
}

.store .icon {
  width: 1.7rem;
  height: 1.7rem;
}

.store small {
  display: block;
  font-size: 0.72rem;
  color: #b9b09f;
  letter-spacing: 0.02em;
}

.store strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 650;
}

.store.soon {
  opacity: 0.88;
}

@media (prefers-color-scheme: dark) {
  .store {
    background: #12110d;
    box-shadow: 0 0 0 1px #4a4450 inset;
  }
}

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

.site-footer {
  background: #0f1712;
  color: #b8c0b3;
  padding: 4rem 0 2.5rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #e2e8dc;
  text-decoration: none;
}

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

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.footer-grid h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f9a8a;
  margin-bottom: 1rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-brand img {
  height: 1.7rem;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 20rem;
}

.footer-brand .social {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.footer-brand .social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand .social .icon {
  width: 1.2rem;
  height: 1.2rem;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #8f9a8a;
}

.footer-bottom p {
  margin: 0;
}

/* ---------------------------------------------------------------- long pages */

.page-hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(50rem 26rem at 90% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    var(--lilac);
}

@media (prefers-color-scheme: dark) {
  .page-hero {
    background: var(--lilac);
  }
}

.page-hero h1 {
  font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 48rem;
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 40rem;
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0;
}

.page-hero .meta {
  margin-top: 1.2rem;
  font-size: 0.92rem;
}

.prose {
  max-width: 44rem;
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.prose h2 {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
  margin: 3rem 0 1rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  font-size: 1.08rem;
}

.prose ul {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose .note {
  color: var(--muted);
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 1.1rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
  line-height: 1.5;
}

th,
td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

tbody tr + tr > * {
  border-top: 1px solid var(--line);
}

tbody th {
  font-weight: 650;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.subject-list {
  margin: 1.5rem 0 0;
  padding: 0 1.3rem;
  border-radius: 1.1rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

.subject-list summary {
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 650;
}

.subject-list[open] summary {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.subjects {
  margin: 0;
  padding-bottom: 1.3rem;
  font-size: 0.97rem;
  line-height: 1.5;
}

.subjects dt {
  margin-top: 1rem;
  font-weight: 650;
}

.subjects dt:first-child {
  margin-top: 0;
}

.subjects dt span {
  font-weight: 400;
  color: var(--muted);
}

.subjects dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.callout {
  margin: 3.5rem 0 0;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  border-radius: var(--radius);
  background: var(--lilac);
  box-shadow: var(--shadow);
}

.prose .callout h2 {
  margin: 0 0 0.6rem;
}

.callout p {
  color: var(--muted);
}

/* Short pages: thanks, problems, not found */

.message {
  min-height: calc(100vh - 4rem);
  display: grid;
  place-items: center;
  padding: 4rem var(--gutter);
  text-align: center;
}

.message .panel {
  width: 100%;
  max-width: 40rem;
}

.message .gleam-big {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.6rem;
  color: var(--accent);
  animation: gleam-in 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.message h1 {
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.message p {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  font-size: 1.12rem;
  color: var(--muted);
}

.message .signup {
  margin: 1.5rem auto 0;
  text-align: left;
}

/* ---------------------------------------------------------------- motion */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-copy > * {
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 0.08s;
}

.hero-copy > :nth-child(3) {
  animation-delay: 0.16s;
}

.hero-copy > :nth-child(4) {
  animation-delay: 0.24s;
}

.hero-copy > :nth-child(5) {
  animation-delay: 0.32s;
}

/* Sections rise into place as they scroll in, where the browser can tie that to scrolling. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  .screen img:not(:first-child),
  .reasons span:not(:first-child) {
    display: none;
  }
}

@media print {
  .site-header,
  .stage,
  .signup,
  .closing,
  .site-footer {
    display: none;
  }

  .hero,
  .page-hero {
    background: none;
    color: #000;
  }
}
