/* Plain CSS, no framework and no build: two pages do not need either.
 *
 * Paper and ink, in the dashboard's values, with the color carried by one
 * picture (art.svg) in the colors of the painting on João Gilberto's
 * "Amoroso": vermilion, teal, mustard. Everything else is modules: soft
 * panels with a small label. The dark set is chosen by the device; there
 * is no toggle. See docs/decisions.md. */

:root {
  color-scheme: light dark;
  --page: #fffdf8;
  --surface: #f5f1e8;
  --text: #1d1e20;
  --muted: #69655c;
  --line: #e0d8c8;
  --chip-line: #a9a395;
  --cold: #cfe3ee;
  --cold-text: #17465c;
  --good: #1f5f58;
  --bad: #c4432a;
  /* The one accent outside the picture: its mustard, used only as a fill
   * behind dark text, and for lines. Never as text on the page color. */
  --mustard: #d78b2c;
  --gutter: clamp(1.25rem, 5vw, 6rem);
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #141516;
    --surface: #1d1e20;
    --text: #efece4;
    --muted: #a3a199;
    --line: #2f3033;
    --chip-line: #5a5a56;
    --cold: #a8cde0;
    --cold-text: #10212b;
    --good: #7fcabd;
    --bad: #f2675f;
    --mustard: #e9a94a;
  }
}

html {
  font-size: clamp(100%, 0.4vw + 0.65rem, 118.75%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 1.0625rem/1.6 var(--sans);
}

header,
main,
footer {
  margin: 0 auto;
  max-width: 110rem;
  padding: 0 var(--gutter);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

a {
  color: inherit;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  width: 1.4rem;
  height: 1.5rem;
  background: currentcolor;
  -webkit-mask: url("logo.svg") center / contain no-repeat;
  mask: url("logo.svg") center / contain no-repeat;
}

/* No last line of one short word. */
h1,
.statement {
  text-wrap: pretty;
}

.statement {
  font-size: clamp(1.375rem, 2.3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}

/* The top row's right side: a thin link to the foot of the page, where
 * the addresses are, and the one button. */
.actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.quiet {
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.quiet:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--mustard);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* A small rounded label: section names, step numbers, and the one button. */
.pill {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 2rem;
  background: var(--page);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.pill.solid,
.pill.step {
  background: var(--mustard);
  box-shadow: none;
  color: #1d1e20;
}

.pill.solid {
  padding: 0.45rem 1rem;
  font-size: 0.9375rem;
}

/* The opening statement: one bold sentence, then the rest in a quieter
 * serif, as one paragraph. */
h1 {
  margin: 3rem 0 2.5rem;
  font-size: clamp(1.75rem, 3.1vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 span,
.statement span {
  color: var(--muted);
  font-family: var(--serif);
  font-weight: 400;
}

h2 {
  margin: 4.5rem 0 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.1875rem;
  line-height: 1.3;
}

p {
  margin: 0.4rem 0 0;
}

/* The picture. */
.stage {
  position: relative;
}

.stage img {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
}

.card {
  margin: 0;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: var(--surface);
}

figcaption {
  margin-top: 0.75rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards p,
.card > p {
  color: var(--muted);
}

.wide + .wide {
  margin-top: 1rem;
}

/* The dashboard's list of leads, drawn in HTML so it follows light and
 * dark and cannot go stale as a screenshot would. */
.leads {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  column-gap: 1.25rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--page);
  font-size: 0.9375rem;
}

.leads li {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.leads li:last-child {
  border-bottom: none;
}

.leads span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.leads span b {
  color: var(--text);
}

.chip {
  justify-self: start;
  padding: 0.1rem 0.6rem;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px var(--chip-line);
  font-size: 0.78rem;
  font-weight: 600;
}

.leads .chip.cold {
  background: var(--cold);
  box-shadow: none;
  color: var(--cold-text);
}

.chip.cold::before {
  content: "\2744\fe0e\00a0";
}

.cars {
  grid-template-columns: auto auto minmax(0, 1fr);
  column-gap: 2rem;
}

.leads .notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  overflow: visible;
  white-space: normal;
}

.leads .notes .good {
  color: var(--good);
}

.leads .notes .bad {
  color: var(--bad);
}

/* The last word on the page: centered on the open page, with the one
 * button. It has no panel, so it does not read as a third example. */
.cta {
  margin-top: 4.5rem;
  padding: 0 1.5rem;
  text-align: center;
}

.cta h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1.2;
}

.cta p {
  margin: 0.75rem auto 1.5rem;
  max-width: 34rem;
  color: var(--muted);
}

/* The address is the link: large type, with a line under it only when
 * pointed at. It can still be selected and copied. */
.reach {
  margin-top: 1.5rem;
}

.reach a {
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--mustard);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
}

a.brand {
  font-weight: 700;
  text-decoration: none;
}

/* The foot of every page: black in light and dark, like the back of a
 * record sleeve. The name on one side, the way to reach us on the other. */
footer {
  max-width: none;
  margin-top: 5rem;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  background: #0e0f10;
  color: #efece4;
}

.foot {
  display: grid;
  gap: 2rem;
}

.brand.big {
  align-self: start;
  font-size: 1.5rem;
}

.brand.big .logo {
  width: 1.9rem;
  height: 2.05rem;
}

.foot p {
  margin: 0 0 0.35rem;
  color: #a3a199;
}

.foot a {
  color: #efece4;
  font-weight: 600;
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
  text-decoration-color: #e9a94a;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #2f3033;
  color: #a3a199;
  font-size: 0.875rem;
}

/* Narrow screens: a lead's name on one line, the rest beneath. */
@media (max-width: 36rem) {
  .leads {
    display: block;
  }

  .leads li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }

  .leads li > b {
    flex: 0 0 100%;
  }
}

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

@media (min-width: 72rem) {
  .wide {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 0 3rem;
    align-items: center;
  }

  .wide .leads {
    margin-top: 0;
  }

  .foot {
    grid-template-columns: 1fr auto;
  }

}
