/* Dew's look, from the app: the sign-in card's paper, ink and layout (AppleReturnPage.swift), the intro's sunrise, the brand's
   three strokes (fig, raspberry, mandarin: BrandColors.swift), the system font (the app's body font). The home and 404
   pages use them; the privacy page keeps only the paper and ink. */

:root {
  color-scheme: light dark;
  --paper: #fffcfa;
  --ink: rgba(0, 0, 0, 0.85);
  --soft: rgba(0, 0, 0, 0.6);
  --faint: rgba(0, 0, 0, 0.1);
  --rule: rgba(0, 0, 0, 0.09);
  --sun: radial-gradient(ellipse 62vmax 36vmax at 50% 112%, rgba(255, 158, 77, 0.95), rgba(255, 115, 102, 0.34) 50%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15171e;
    --ink: rgba(255, 255, 255, 0.92);
    --soft: rgba(255, 255, 255, 0.6);
    --faint: rgba(255, 255, 255, 0.12);
    --rule: rgba(255, 255, 255, 0.11);
    --sun: radial-gradient(ellipse 62vmax 36vmax at 50% 112%, rgba(255, 150, 80, 0.82), rgba(255, 77, 112, 0.2) 50%, transparent);
  }
}

* { box-sizing: border-box; margin: 0; }

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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Links are the text's colour with a faint underline; the system draws the focus ring. */
a { color: inherit; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentColor; }

/* The wordmark: "Dew" in text, where the sign-in card puts its logo row. */
.logo {
  display: inline-block;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* The big lowercase heading with the brand's three strokes. */
.hero {
  position: relative;
  width: fit-content;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.03;
  text-transform: lowercase;
}
.spark { position: absolute; top: 0; right: 0; width: 0.06em; height: 0.22em; translate: 0.24em -0.06em; }
.spark i { position: absolute; left: 50%; top: 50%; width: 0.06em; border-radius: 1em; }
.spark i:nth-child(1) { height: 0.22em; background: #8f6bff; transform: translate(calc(-50% - 0.06em), calc(-50% - 0.04em)) rotate(10deg); }
.spark i:nth-child(2) { height: 0.2em; background: #ff4d70; transform: translate(calc(-50% + 0.06em), calc(-50% + 0.04em)) rotate(55deg); }
.spark i:nth-child(3) { height: 0.16em; background: #ff9638; transform: translate(calc(-50% + 0.1em), calc(-50% + 0.2em)) rotate(95deg); }

@media (prefers-reduced-motion: no-preference) {
  .sunrise::before { animation: rise 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .spark i { animation: pop 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
  .spark i:nth-child(1) { animation-delay: 0.45s; }
  .spark i:nth-child(2) { animation-delay: 0.57s; }
  .spark i:nth-child(3) { animation-delay: 0.69s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12vh); } }
@keyframes pop { from { opacity: 0; scale: 0.2; } }

/* Home: the sign-in card's column on the intro's sunrise. */

.sunrise::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--sun);
  pointer-events: none;
}

.home {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 34px 16px;
}
.home .column { width: min(320px, 100%); }
.home .logo { margin-bottom: 44px; }
.home .hero { font-size: 52px; margin-bottom: 14px; }
.home p { color: var(--soft); font-size: 15px; }
.home.solo .hero { font-size: clamp(26px, 13vw, 88px); white-space: nowrap; margin: 0; }

/* The privacy page: a calm legal page. Quiet headings, a ~40rem measure, a sticky contents list on wide
   screens and a collapsed one on narrow ones. */

.legal { font-size: 17px; line-height: 1.65; }

.layout {
  flex: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 40rem);
  justify-content: center;
}

.toc { display: none; }

@media (min-width: 1000px) {
  .layout { grid-template-columns: 13rem minmax(0, 40rem); column-gap: 4rem; }
  .toc {
    display: block;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    padding: 6.6rem 0 2rem;
    font-size: 0.8125rem;
    line-height: 1.45;
  }
  .toc p { margin-bottom: 0.75rem; color: var(--ink); font-weight: 600; }
  .toc ol { list-style: none; padding: 0; }
  .toc li + li { margin-top: 0.45rem; }
  .toc a { color: var(--soft); text-decoration: none; }
  .toc a:hover { color: var(--ink); }
  .toc-inline { display: none; }
}

.page { padding: 3rem 0 4rem; min-width: 0; }

.page > header .wordmark {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--soft);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.page > header .wordmark:hover { color: var(--ink); }
.page h1 { font-size: 2.25rem; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.page .meta { margin-top: 0.5rem; color: var(--soft); font-size: 0.9rem; }
.page .lede { margin-top: 2rem; }

.short { margin-top: 2rem; padding: 1.75rem 0 2rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.short h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.short ul { padding-left: 1.2rem; font-size: 1.1rem; line-height: 1.6; }
.short li + li { margin-top: 0.55rem; }
.short li::marker { color: var(--soft); }

.toc-inline { margin-top: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.toc-inline summary { cursor: pointer; color: var(--soft); font-weight: 600; }
.toc-inline summary:hover { color: var(--ink); }
.toc-inline ol { margin-top: 0.75rem; padding-left: 1.5rem; }
.toc-inline li + li { margin-top: 0.3rem; }
.toc-inline a { text-decoration: none; }

.page section[id] { margin-top: 3.25rem; }
.page section[id] h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; margin-bottom: 0.75rem; }
.page section[id] h2 a { text-decoration: none; }
.page section[id] h2 a:hover { color: inherit; }
.page p + p, .page p + ul, .page ul + p { margin-top: 0.9rem; }
.page section[id] ul { padding-left: 1.2rem; }
.page section[id] li + li { margin-top: 0.6rem; }
.page section[id] li::marker { color: var(--soft); }
.page strong { font-weight: 600; }
.page code {
  font: 0.85em ui-monospace, "SF Mono", Menlo, monospace;
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--rule);
}
.page p, .page li { overflow-wrap: break-word; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; }
.page table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.page th, .page td { text-align: left; vertical-align: top; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
.page th { font-size: 0.85rem; font-weight: 600; color: var(--soft); }
.page td:first-child { width: 45%; }

/* Footer */

footer {
  position: relative;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.25rem 16px 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  justify-content: center;
  color: var(--soft);
  font-size: 0.875rem;
}
.layout + footer { max-width: 64rem; border-top: 1px solid var(--rule); }
footer a { color: var(--soft); }
footer a:hover { color: var(--ink); }
footer.quiet { gap: 0.4rem; font-size: 0.8125rem; padding-bottom: 1.5rem; }
