/* mymemos.reddec.net — the app's palette, one card at a time.
   Warm paper, ink, soft white cards and one calm indigo accent. Notes set in
   sans, display sizes in serif; nothing uppercase, nothing monospace. Light and
   dark follow the system: the site has no theme switch because the app has none
   either. No JavaScript anywhere. */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-serif.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-serif-italic.woff2") format("woff2");
}

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

/* ----------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  /* Straight from the app's Theme.kt: warm paper, white cards, memo blue. */
  --paper: #faf8f4;
  --paper-deep: #f4f1ea;
  --card: #ffffff;
  --rule: #edeae3;
  --rule-strong: #ddd8ce;

  --ink: #23262b;
  --ink-soft: #4b5158;
  --muted: #74797f;

  --accent: #4a5bc4;
  --accent-soft: #edeffb;

  --display: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent),
    0 18px 40px -34px color-mix(in srgb, var(--ink) 60%, transparent);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --block: clamp(3rem, 7vw, 5.5rem);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131416;
    --paper-deep: #191b1e;
    --card: #1b1d20;
    --rule: #2a2d31;
    --rule-strong: #3a3e43;

    --ink: #e8e6e1;
    --ink-soft: #c6c8c7;
    --muted: #9aa0a6;

    --accent: #a8b4f0;
    --accent-soft: #232840;
  }
}

/* ------------------------------------------------------------------- base */

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

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(1.6rem, 3.1vw, 2.25rem);
  line-height: 1.14;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.006em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 0.2em;
  transition: color 120ms ease, text-decoration-color 120ms ease, border-color 120ms ease,
    background-color 120ms ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

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

code {
  padding: 0.1rem 0.35rem;
  background: var(--paper-deep);
  border-radius: var(--r-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

::selection {
  background: var(--accent);
  color: var(--card);
}

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

/* ------------------------------------------------------------------ shell */

main {
  flex: 1 0 auto;
}

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

.skip-link {
  position: absolute;
  top: -4rem;
  left: 0;
  z-index: 40;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.75rem;
}

/* The wordmark is the app's own name: letterspaced, no logo, no capitals. */
.brand {
  padding-block: 0.35rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-decoration: none;
  white-space: nowrap;
}

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

.brand--footer {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

.topnav a {
  padding-block: 0.45rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--ink);
}

.topnav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.footer {
  margin-top: var(--block);
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  padding-block: clamp(2rem, 4vw, 3rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: start;
}

.footer-mark {
  display: grid;
  gap: 0.6rem;
  max-width: 34rem;
}

.footer-line {
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.35rem;
  font-size: 0.875rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ typography */

.kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

.lede {
  max-width: 42ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.prose {
  display: grid;
  gap: 1rem;
  max-width: 62ch;
}

.prose p {
  color: var(--ink-soft);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

.btn--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--card);
}

.btn--ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Icons are inline SVGs from src/icons/ (Material Design Light), sized in em so
   they track the text; currentColor keeps them in the label's colour. */
.icon {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  flex: none;
}

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

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.hero-copy h1 {
  max-width: 16ch;
}

.hero-copy h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  padding-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.hero-note span {
  white-space: nowrap;
}

.hero-shots {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-shots .phone:first-child {
  width: min(17rem, 20vw);
}

/* The second screen is a step behind and a step lower: depth without motion. */
.hero-shots .phone:last-child {
  width: min(15rem, 18vw);
  margin-left: clamp(-2.5rem, -1.8vw, -1rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* -------------------------------------------------------------- screenshots */

/* The app's own shape: a white card with soft corners, no browser chrome. */
.phone {
  margin: 0;
  padding: 0.4rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}

.phone img {
  width: 100%;
  border-radius: calc(var(--r-xl) - 0.4rem);
}

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

.section {
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}

.section--tight {
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
}

.section-head {
  display: grid;
  gap: 0.65rem;
  max-width: 46ch;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.section-head p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.section-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  font-size: 0.9375rem;
}

.section-foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.section-foot a:hover {
  text-decoration: underline;
}

/* Banded block: a quieter plane behind the cards. */
.band {
  border-block: 1px solid var(--rule);
  background: var(--paper-deep);
}

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

.page-head {
  display: grid;
  gap: 1rem;
  padding-block: clamp(2.25rem, 4vw, 3.75rem) clamp(1.25rem, 2.5vw, 2rem);
}

.page-head h1 {
  max-width: 24ch;
}

.page-head .lede {
  max-width: 54ch;
}

/* ------------------------------------------------------------ the cards */

/* A memo is a thing you can hold, so every list on this site is cards: white,
   rounded, a soft shadow, never a ruled table. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.card {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: clamp(1.15rem, 2vw, 1.5rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.card h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* The feed's card header: time and visibility, small and quiet. */
.card-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.card-head .num {
  color: var(--accent);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  padding: 0.15rem 0.6rem;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--accent);
}

/* The app's day separators: a serif heading with a quiet count beside it. */
.group-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: 1.375rem;
  line-height: 1.2;
}

.group-label span:last-child {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ------------------------------------------------------------- promises */

.promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.promise {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding: clamp(1.15rem, 2vw, 1.5rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.promise .num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.promise h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
}

.promise p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------------------------- the look */

.look {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.look-copy {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.look-copy .prose {
  gap: 0.9rem;
  font-size: 0.9375rem;
}

.look-shot {
  display: flex;
  justify-content: center;
}

.look-shot .phone {
  width: min(19rem, 100%);
}

/* --------------------------------------------------------------- gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
}

.shot {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.shot .phone {
  justify-self: start;
  width: 100%;
  max-width: 17rem;
}

.shot h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
}

.shot p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.gallery-section + .gallery-section {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.article .gallery-section + .gallery-section {
  margin-top: 0;
}

/* --------------------------------------------------------------- prose pages */

.article {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  max-width: 68rem;
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
}

.block {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 0.75rem clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.15rem, 2vw, 1.5rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.block-title {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.block-title h2 {
  font-size: clamp(1.3rem, 2vw, 1.5rem);
}

.block-body {
  display: grid;
  gap: 1rem;
  max-width: 62ch;
}

.block-body > p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* Numbered steps, set off by a small accent digit. */
.steps {
  display: grid;
  gap: 1.1rem;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.95;
  color: var(--accent);
}

.steps b {
  color: var(--ink);
  font-weight: 600;
}

.plain-list {
  display: grid;
  gap: 0.6rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.plain-list li {
  position: relative;
  padding-left: 1.15rem;
}

.plain-list li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
}

/* --------------------------------------------------------------- closing */

.closing {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
}

.closing h2 {
  max-width: 24ch;
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 62rem) {
  .hero-inner,
  .look {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-shots {
    justify-content: center;
  }

  .hero-shots .phone:first-child {
    width: 17rem;
  }

  .hero-shots .phone:last-child {
    width: 14rem;
    margin-left: -1.75rem;
    margin-top: 2.25rem;
  }

  .look-shot {
    justify-content: flex-start;
  }

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

  .block-title {
    gap: 0.25rem;
  }
}

@media (max-width: 44rem) {
  body {
    font-size: 1rem;
  }

  .topbar-inner {
    gap: 1rem;
  }

  .topnav {
    gap: 0.15rem 1rem;
  }

  .topnav a {
    font-size: 0.8125rem;
  }

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

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

  .footer-copy {
    grid-column: auto;
  }

  /* One shot per row, picture beside its caption: the gallery reads as an
     index instead of a column of full-width phones. */
  .gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.35rem;
  }

  .shot {
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 1rem 1.15rem;
    align-items: start;
  }

  .shot .phone {
    width: 8rem;
  }
}

@media (max-width: 26rem) {
  .topbar-inner {
    flex-wrap: wrap;
    padding-block: 0.55rem;
  }

  .hero-shots .phone:last-child {
    display: none;
  }

  .hero-shots .phone:first-child {
    width: 15rem;
  }
}

/* ----------------------------------------------------------------- print */

@media print {
  .topbar,
  .footer-nav,
  .actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero-shots,
  .gallery,
  .card,
  .promise,
  .block {
    break-inside: avoid;
    box-shadow: none;
  }
}
