/*
 * One stylesheet for every page of ferrynotes.com. The note colours are the
 * app's own swatches from apps/desktop/src/ui/colors.ts, light and dark, so the
 * site looks like the thing it describes.
 */

:root {
  color-scheme: light dark;
  --paper: #fffcf2;
  --card: #ffffff;
  --ink: #2b2616;
  --muted: #6b6450;
  --line: #ece4c8;
  --accent: #f7e37f;
  --link: #6b5300;
  --wall: linear-gradient(135deg, #e6edf7 0%, #f5eedd 100%);
  --frame: #23201a;
  --screen: #eef2f7;
  --tile: #d5dce6;
  --shadow: 0 12px 32px rgba(45, 35, 0, 0.14), 0 2px 6px rgba(45, 35, 0, 0.08);

  --yellow: #fff3b0;
  --yellow-band: #f7e37f;
  --yellow-ink: #3d3417;
  --blue: #c7e4fb;
  --blue-band: #a3d3f7;
  --blue-ink: #152e42;
  --green: #cbf0c8;
  --green-band: #a9e4a5;
  --green-ink: #1e3a1c;
  --pink: #fbd0e0;
  --pink-band: #f5b2cc;
  --pink-ink: #431f30;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f;
    --card: #211e16;
    --ink: #f3eedb;
    --muted: #b4ac92;
    --line: #37321f;
    --accent: #5a5226;
    --link: #f7e37f;
    --wall: linear-gradient(135deg, #1d2530 0%, #2a2419 100%);
    --frame: #050504;
    --screen: #12161c;
    --tile: #28303b;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);

    --yellow: #463f1c;
    --yellow-band: #5a5226;
    --yellow-ink: #f7eec4;
    --blue: #1d3a54;
    --blue-band: #264a6a;
    --blue-ink: #d2e7fa;
    --green: #22402a;
    --green-band: #2c5236;
    --green-ink: #d2f0d3;
    --pink: #4e2537;
    --pink-band: #632f46;
    --pink-ink: #fad4e3;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

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

/* Header and footer */

.site-header .wrap,
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-header .wrap {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.links a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
}

.site-footer .wrap {
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Landing page */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 3rem 0 4.5rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.3rem, 5.2vw, 3.7rem);
  line-height: 1.07;
  letter-spacing: -0.022em;
}

.lede {
  max-width: 34rem;
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.soon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.pill {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 650;
}

/*
 * The illustration: one note floating on a desktop, and the same note in a
 * phone's home-screen widget. Sizes inside it follow the scene's own width, so
 * it scales as one picture from phone to desktop.
 */
.scene {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  aspect-ratio: 5 / 4;
  container-type: inline-size;
}

.desktop {
  position: absolute;
  inset: 0 16% 13% 0;
  border-radius: 14px;
  background: var(--wall);
  box-shadow: var(--shadow);
}

.note {
  overflow: hidden;
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.note .band {
  height: 1.4rem;
  height: 5.5cqi;
}

.note .text {
  padding: 0.8rem 0.95rem 1rem;
  padding: 3cqi 3.6cqi 3.8cqi;
  font-size: 0.95rem;
  font-size: 3.5cqi;
  line-height: 1.45;
}

.note .text strong {
  display: block;
  margin-bottom: 0.15em;
}

.note.yellow {
  background: var(--yellow);
  color: var(--yellow-ink);
}

.note.yellow .band {
  background: var(--yellow-band);
}

.note.blue {
  background: var(--blue);
  color: var(--blue-ink);
}

.note.blue .band {
  background: var(--blue-band);
}

.desktop .note.first {
  position: absolute;
  top: 11%;
  left: 9%;
  width: 50%;
  transform: rotate(-2.5deg);
}

.desktop .note.second {
  position: absolute;
  top: 60%;
  left: 17%;
  width: 36%;
  transform: rotate(2deg);
}

.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 33%;
  aspect-ratio: 9 / 18.5;
  padding: 2cqi;
  border-radius: 7cqi;
  background: var(--frame);
  box-shadow: var(--shadow);
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 5cqi;
  height: 100%;
  padding: 9cqi 3.5cqi 3.5cqi;
  border-radius: 5.2cqi;
  background: var(--screen);
}

.screen .note {
  border-radius: 3.6cqi;
  box-shadow: none;
}

.screen .note .band {
  height: 2.4cqi;
}

.screen .note .text {
  padding: 2cqi 2.6cqi 2.6cqi;
  font-size: 2.45cqi;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.4cqi;
  padding: 0 1cqi;
}

.tiles span {
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--tile);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature {
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.feature h2 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* A tiny note, with its band, standing in for an icon. */
.chip {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.chip.yellow {
  background: linear-gradient(var(--yellow-band) 0 34%, var(--yellow) 34%);
}

.chip.blue {
  background: linear-gradient(var(--blue-band) 0 34%, var(--blue) 34%);
}

.chip.green {
  background: linear-gradient(var(--green-band) 0 34%, var(--green) 34%);
}

.chip.pink {
  background: linear-gradient(var(--pink-band) 0 34%, var(--pink) 34%);
}

/* Privacy, support and other text pages */

.doc {
  max-width: 44rem;
  padding: 2rem 0 1rem;
}

.doc h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(2rem, 4.5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc h2 {
  margin: 2.4rem 0 0.6rem;
  font-size: 1.3rem;
  line-height: 1.3;
}

.doc .updated {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

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

.summary {
  margin: 1.75rem 0;
  padding: 1.1rem 1.4rem 1.2rem;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--yellow-ink);
}

.summary h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

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

.summary a {
  color: inherit;
}

/* Narrow screens: one column, the picture under the words. */

@media (max-width: 60rem) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 46rem) {
  body {
    font-size: 16px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding: 1.5rem 0 3rem;
  }

  .scene {
    margin: 0 auto;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}
