/* Numby website styles. Every colour, font and radius is a --numby-* variable
   from /brand/tokens.css (the brand kit); none is written here. Marigold is
   text only on plum: inside .on-plum or as the primary button's label.
   Tests C5 and C6 enforce both rules. */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--numby-background);
  color: var(--numby-foreground);
  font-family: var(--numby-font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--numby-font-display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 20ch;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

.container {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

.narrow {
  width: min(560px, 100% - 2.5rem);
}

/* Header */

.site-header {
  padding-block: 1.25rem;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: block;
  height: 40px;
  width: auto;
}

.header-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Opening */

.hero {
  padding-block: 3rem 4.5rem;
}

.status {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-category);
  color: var(--numby-category-foreground);
  font-weight: 600;
  font-size: 0.95rem;
}

.lead {
  max-width: 62ch;
  font-size: 1.2rem;
  color: var(--numby-muted-foreground);
  margin-bottom: 2rem;
}

.button-primary {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-primary);
  color: var(--numby-primary-foreground);
  font-family: var(--numby-font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button-primary:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--numby-accent);
  outline-offset: 2px;
}

/* Sections */

.section {
  padding-block: 4rem;
}

.section-tint {
  background: var(--numby-question);
}

.cards {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.cards li {
  background: var(--numby-surface);
  border: 1px solid var(--numby-border);
  border-radius: var(--numby-radius-lg);
  padding: 1.5rem;
}

.checklist {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: 70ch;
}

.checklist li {
  position: relative;
  padding-left: 2.25rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-accent);
  box-shadow: inset 0 0 0 0.4rem var(--numby-accent), inset 0 0 0 1rem var(--numby-accent-foreground);
}

/* Early access, on plum */

.on-plum {
  background: var(--numby-dark-background);
  color: var(--numby-dark-foreground);
}

.on-plum h2 {
  color: var(--numby-primary-foreground);
}

.on-plum .button-primary {
  background: var(--numby-accent);
  color: var(--numby-accent-foreground);
}

form {
  margin-top: 2rem;
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

label {
  font-weight: 600;
}

input {
  font-family: var(--numby-font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--numby-border);
  border-radius: var(--numby-radius-md);
  background: var(--numby-surface);
  color: var(--numby-foreground);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  font-weight: 600;
}

form small {
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  padding-block: 2rem;
  color: var(--numby-muted-foreground);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0 0 0.25rem;
}

/* Illustration colours: every SVG shape takes its colour from a class bound
   to a brand variable, so a brand change recolours every drawing. */

.f-marigold { fill: var(--numby-marigold); }
.f-plum { fill: var(--numby-plum); }
.f-butter { fill: var(--numby-butter); }
.f-lilac { fill: var(--numby-lilac); }
.f-cream { fill: var(--numby-cream); }
.f-paper { fill: var(--numby-paper); }
.f-surface { fill: var(--numby-surface); }
.s-plum { stroke: var(--numby-plum); }
.s-marigold { stroke: var(--numby-marigold); }
.s-cream { stroke: var(--numby-cream); }
.s-border { stroke: var(--numby-border); }

.illustration {
  display: block;
  width: 100%;
  height: auto;
}

.icon {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 0.9rem;
}

.center {
  text-align: center;
  margin-inline: auto;
}

/* Opening, with the illustration beside the words */

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  max-width: 12ch;
}

.hero .lead {
  max-width: 44ch;
}

.hero-art {
  max-width: 420px;
  justify-self: end;
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.made-in {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.made-in .icon {
  width: 32px;
  height: 32px;
  margin: 0;
}

/* Planned to work with: books and banks, named as text, not logos */

.works-with {
  padding-block: 2rem;
  border-block: 1px solid var(--numby-border);
  background: var(--numby-surface);
}

.works-title {
  font-family: var(--numby-font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--numby-muted-foreground);
  text-align: center;
  margin-bottom: 1.25rem;
}

.works-rows {
  display: grid;
  gap: 2rem;
}

.works-label {
  margin: 0 0 0.8rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

.logo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.logo-tile,
.file-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 120px;
  min-height: 84px;
  padding: 0.9rem 1.2rem;
  border-radius: var(--numby-radius-lg);
  border: 1px solid var(--numby-border);
  background: var(--numby-surface);
}

.logo-tile img,
.file-tile img {
  display: block;
  width: auto;
  max-width: 100%;
}

.logo-list {
  align-items: stretch;
  gap: 0.9rem;
}

.file-tile {
  justify-content: flex-start;
  width: 118px;
  padding-inline: 0;
}

/* Banks: every logo's picture is the same height (set per logo in the page). */
.bank-row .logo-tile {
  padding-inline: 1rem;
}

/* Each bank logo carries its own height in --h, chosen so every picture is
   36px tall; on a phone they all scale by the same factor. */
.bank-row img {
  height: calc(var(--h) * 1px);
}



.logo-list:has(.file-tile) {
  gap: 0.75rem;
}

.logo-caption {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  max-width: 13ch;
  line-height: 1.25;
}

.works-tag {
  padding: 0.1rem 0.5rem;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-accent);
  color: var(--numby-accent-foreground);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Canadian, like your firm */

.canada-lead {
  max-width: 60ch;
  font-size: 1.15rem;
}

.canada-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
}

.canada-mark .icon {
  width: 140px;
  height: 140px;
  margin: 0;
}

@media (max-width: 860px) {
  .canada-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .canada-mark .icon {
    width: 88px;
    height: 88px;
  }
}

/* The work numby takes on */

.problem {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 4rem;
}

.problem-flip .problem-art {
  order: 2;
}

.problem-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.problem-title h3 {
  margin: 0;
}

.problem-number {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-primary);
  color: var(--numby-primary-foreground);
  font-family: var(--numby-font-display);
  font-weight: 800;
}

.problem h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.pain {
  font-size: 1.15rem;
}

.fix {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--numby-radius-lg);
  background: var(--numby-surface);
  border: 1px solid var(--numby-border);
}

.fix p:last-child {
  margin-bottom: 0;
}

.fix-label {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.75rem;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-category);
  color: var(--numby-category-foreground);
  font-weight: 600;
  font-size: 0.9rem;
}

/* The back-and-forth with clients */

.section-sun {
  background: var(--numby-surface);
}

.section-sun .problem {
  margin-top: 0;
}

.section-sun .fix {
  background: var(--numby-background);
}

/* The rest of the month */

.spots {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  /* Three cards to a row; a shorter last row is centred. */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.spots li {
  flex: 0 1 calc((100% - 2 * 1.25rem) / 3);
  min-width: 260px;
  background: var(--numby-surface);
  border-radius: var(--numby-radius-lg);
  padding: 1.75rem;
}

.spots h3,
.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.spots p,
.steps p {
  margin: 0;
  font-size: 0.98rem;
}

/* How it will work */

.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.steps li {
  position: relative;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  left: 76px;
  right: -12px;
  border-top: 3px dotted var(--numby-border);
}

/* The review screen */

.screen {
  margin: 3.5rem auto 0;
  max-width: 880px;
}

.app {
  border-radius: var(--numby-radius-lg);
  border: 1px solid var(--numby-border);
  background: var(--numby-surface);
  overflow: hidden;
  box-shadow: 0 18px 40px -24px var(--numby-plum);
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: var(--numby-dark-background);
}

.app-name {
  color: var(--numby-dark-foreground);
  font-family: var(--numby-font-display);
  font-weight: 800;
}

.app-bar-client {
  margin-left: auto;
  color: var(--numby-dark-foreground);
  font-size: 0.9rem;
  font-weight: 500;
}

.app-body {
  padding: 1.25rem 1.25rem 1rem;
}

.app-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-account {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.app-source {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--numby-muted-foreground);
}

.threshold {
  flex: none;
  padding: 0.3rem 0.8rem;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-primary);
  color: var(--numby-primary-foreground);
  font-size: 0.8rem;
  font-weight: 600;
}

.app-head,
.app-row {
  display: grid;
  grid-template-columns: 3.6rem 1.3fr 1.5fr 9.5rem 5.5rem;
  column-gap: 0.9rem;
  align-items: center;
}

.app-head {
  padding: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--numby-muted-foreground);
}

.app-head-amount {
  justify-self: end;
}

.app-row {
  row-gap: 0.45rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--numby-border);
  font-size: 0.93rem;
}

.app-row-wait {
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
  background: var(--numby-background);
}

.app-date {
  font-family: var(--numby-font-mono);
  font-size: 0.82rem;
  color: var(--numby-muted-foreground);
}

.app-desc {
  font-weight: 600;
}

.chip {
  justify-self: start;
  padding: 0.2rem 0.7rem;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-category);
  color: var(--numby-category-foreground);
  font-size: 0.82rem;
  font-weight: 600;
}

.chip-question {
  background: var(--numby-question);
  color: var(--numby-question-foreground);
}

/* Confidence: a bar with a tick at the threshold, the value, and what happens. */
.conf {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 0.5rem;
  row-gap: 0.25rem;
}

.meter {
  position: relative;
  height: 6px;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-border);
}

.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--numby-radius-pill);
  background: var(--numby-plum);
}

.meter-low {
  background: var(--numby-muted-foreground);
}

.meter-mark {
  position: absolute;
  left: 90%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--numby-accent);
}

.conf-value {
  font-family: var(--numby-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.status {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0.1rem 0.55rem;
  border-radius: var(--numby-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-auto {
  border: 1px solid var(--numby-border);
  color: var(--numby-foreground);
}

.status-wait {
  background: var(--numby-accent);
  color: var(--numby-accent-foreground);
}

.status-asked {
  background: var(--numby-question);
  color: var(--numby-question-foreground);
}

/* Money amounts are always plum, in tabular figures. */
.amount {
  justify-self: end;
  font-family: var(--numby-font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--numby-plum);
}

.app-why {
  grid-column: 2 / -1;
  font-size: 0.83rem;
  color: var(--numby-muted-foreground);
}

.app-why b {
  color: var(--numby-foreground);
  font-weight: 600;
}

.app-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--numby-border);
}

.app-button {
  padding: 0.45rem 1rem;
  border-radius: var(--numby-radius-pill);
  border: 1px solid var(--numby-border);
  font-weight: 600;
  font-size: 0.88rem;
}

.app-button-primary {
  background: var(--numby-primary);
  color: var(--numby-primary-foreground);
  border-color: var(--numby-primary);
}

.screen figcaption {
  max-width: 62ch;
  margin: 1rem auto 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--numby-muted-foreground);
}

.screen figcaption b {
  color: var(--numby-foreground);
}

/* Narrow screens */

@media (max-width: 860px) {
  .hero-grid,
  .problem {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-art {
    justify-self: center;
    max-width: 360px;
  }

  .problem-flip .problem-art {
    order: 0;
  }

  .problem-art {
    max-width: 420px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps li:not(:last-child)::after {
    display: none;
  }

  .app-head {
    display: none;
  }

  .app-row {
    grid-template-columns: 3.2rem 1fr auto;
  }

  .app-row .chip,
  .app-row .conf,
  .app-why {
    grid-column: 2 / -1;
  }
}

/* Phones: placed last so these rules win over the ones above. */
@media (max-width: 600px) {
  .logo-list {
    gap: 0.5rem;
  }

  .logo-tile {
    min-width: 0;
    min-height: 60px;
    padding: 0.6rem 0.75rem;
  }

  .logo-tile img {
    max-height: 28px;
  }

  .bank-row img {
    max-height: none;
    height: calc(var(--h) * 0.62px);
  }

  .logo-list:has(.file-tile) {
    gap: 0.5rem;
  }

  .file-tile {
    width: calc((100% - 1rem) / 3);
    min-width: 0;
    padding: 0.6rem 0.25rem;
  }

  .file-tile img {
    height: 40px;
  }

  .logo-caption {
    font-size: 0.75rem;
  }

  .spots li {
    flex-basis: 100%;
    min-width: 0;
  }
}
