/* Deltella's site. It should look like the app: the stone desk, one paper colour, and violet only
   where the app uses it, for selection. */
:root {
  --desk: #e6e1d6;
  --paper: #fcfbf8;
  --rule: #d9e2ea;
  --ink: #1d1b19;
  --graphite: #5d5852;
  --blue: #2f5bd3;
  --violet: #7c3aed;
  --line: #cfc8ba;
  --measure: 34rem;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--desk);
}

@media (prefers-color-scheme: dark) {
  /* Studio: a dark desk with a light page. */
  :root:not([data-theme="light"]) {
    --desk: #2a2826;
    --ink-on-desk: #f1ede6;
    --graphite-on-desk: #b6afa5;
    --line: #47433f;
  }
}

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

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink-on-desk, var(--ink));
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:focus-visible,
.download:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 2rem;
  }
}

/* The top line: the mark and two links. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

.mark img {
  width: 32px;
  height: 32px;
}

.top nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
  color: var(--graphite-on-desk, var(--graphite));
}

/* The first screen: the sentence on the desk, the page beside it. */
.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 4rem;
    padding-top: 4rem;
    padding-bottom: 6rem;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.hero .lede {
  font-size: 1.25rem;
  line-height: 1.45;
  max-width: 26rem;
  margin: 0 0 2rem;
  color: var(--graphite-on-desk, var(--graphite));
}

.download {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.35rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}

@media (prefers-color-scheme: dark) {
  /* In Studio the button is a sheet of paper on the dark desk. */
  :root:not([data-theme="light"]) .download {
    background: var(--paper);
    color: var(--ink);
  }
}

.download svg {
  width: 18px;
  height: 18px;
}

.fine {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--graphite-on-desk, var(--graphite));
  max-width: 24rem;
  margin: 1rem 0 0;
}

/* The page: a sheet of ruled paper, slightly lifted off the desk. */
.sheet {
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(60, 48, 30, 0.08), 0 18px 40px -18px rgba(60, 48, 30, 0.35);
  aspect-ratio: 4 / 3;
  width: 100%;
}

.sheet svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ink {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* One sequence, once: write, hold, the mark becomes a square, the pen changes colour. */
.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: write var(--d, 1s) cubic-bezier(0.45, 0.05, 0.4, 1) var(--at, 0s) forwards;
}

@keyframes write {
  to {
    stroke-dashoffset: 0;
  }
}

.rough {
  animation: write 0.9s cubic-bezier(0.45, 0.05, 0.4, 1) 2.3s forwards, vanish 0.01s linear 3.75s forwards;
}

.clean {
  opacity: 0;
  animation: appear 0.18s ease-out 3.75s forwards;
}

.hold {
  opacity: 0;
  transform-origin: 318px 196px;
  animation: hold 0.55s ease-out 3.2s 1 forwards;
}

.frame {
  opacity: 0;
  animation: appear 0.15s ease-out 3.8s forwards, vanish 0.3s ease-in 4.7s forwards;
}

@keyframes appear {
  to {
    opacity: 1;
  }
}

@keyframes vanish {
  to {
    opacity: 0;
  }
}

@keyframes hold {
  0% {
    opacity: 0.6;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .draw,
  .rough,
  .clean,
  .hold,
  .frame {
    animation: none;
  }
  .draw {
    stroke-dashoffset: 0;
  }
  .rough,
  .hold,
  .frame {
    opacity: 0;
  }
  .clean {
    opacity: 1;
  }
}

/* Below the first screen: three quiet proofs, each a picture and a sentence. */
.proofs {
  display: grid;
  gap: 2.5rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .proofs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.proofs figure {
  margin: 0;
}

.proofs .pic {
  background: var(--paper);
  border-radius: 4px;
  aspect-ratio: 3 / 2;
  margin-bottom: 1rem;
}

.proofs .pic svg {
  display: block;
  width: 100%;
  height: 100%;
}

.proofs figcaption {
  max-width: 22rem;
}

.proofs strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.proofs span {
  color: var(--graphite-on-desk, var(--graphite));
}

/* Shared boards: one paragraph and a link. */
.boards {
  display: grid;
  gap: 1rem 4rem;
  padding-top: 3rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 56rem) {
  .boards {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

.boards h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0;
}

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

.boards p.quiet {
  color: var(--graphite-on-desk, var(--graphite));
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  font-size: 0.875rem;
  color: var(--graphite-on-desk, var(--graphite));
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

/* A page of plain words: privacy. */
.prose {
  max-width: var(--measure);
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.prose h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.5rem;
}

.prose p,
.prose li {
  max-width: var(--measure);
}

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

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

.prose .updated {
  color: var(--graphite-on-desk, var(--graphite));
  margin: 0 0 2rem;
}
