/* The static root site. Plain CSS, written phone first. The values repeat the
   portal's house style (src/index.css); keep the two in step by hand. */

:root {
  --ink: #17181c;
  --ink-soft: #5b5e66;
  --paper: #ffffff;
  --line: #e7e7ea;
  --wash: #f4f4f6;
  --radius-panel: 16px;
  /* The marker-pen stroke behind words in the hero. */
  --mark-hero: #7c3aed;
  /* The "#" in the logo: two uprights (1, 2), then two bars (3, 4). */
  --hash-1: #0b3d91;
  --hash-2: #00a6fb;
  --hash-3: #00d4aa;
  --hash-4: #7c3aed;
  /* The "Coming soon" pill and the waiting-list button. Both carry dark text. */
  --pill: #ff69b4;
  --pill-ink: #5a1038;
  /* The text under the hero headline. */
  --hero-note: #67e8f9;
  /* The text of the "UK companies" pill: the blue of the flag drawn in it. */
  --flag-blue: #012169;
  --action: #c9e4f6;
  /* The panel that confirms a place on the waiting list. */
  --done: #bae558;
  --gutter: clamp(20px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Onest", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* The parent brand's name: lower case, in its own heavy typeface, wherever it
   is mentioned. */
.fild {
  color: var(--ink);
  font-family: "MuseoModerno", "Onest", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

/* A marker-pen stroke behind a few words: a slightly tilted band with uneven
   ends across the lower half of the letters. */
.mark {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.mark::before {
  position: absolute;
  z-index: -1;
  inset: 50% -0.16em 2% -0.16em;
  border-radius: 0.5em 0.16em 0.42em 0.2em / 0.28em 0.5em 0.26em 0.52em;
  background: var(--mark-hero);
  content: "";
  rotate: -1.2deg;
}

/* Keeps a hyphenated word on one line. */
.nowrap {
  white-space: nowrap;
}

/* Shown only when reached with the keyboard. */
.skip {
  position: absolute;
  top: 8px;
  left: -999px;
  z-index: 1;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.skip:focus {
  left: var(--gutter);
}

/* Top bar */

.bar {
  border-bottom: 1px solid var(--line);
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--ink);
}

.bar .wordmark {
  font-size: 1.625rem;
}

/* The "#" in front of the name: a drawing of four lines, each its own colour. */
.hash {
  flex: none;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.12em;
  overflow: visible;
}

.hash line {
  stroke-width: 3.4;
  stroke-linecap: round;
}

.hash .h1 {
  stroke: var(--hash-1);
}

.hash .h2 {
  stroke: var(--hash-2);
}

.hash .h3 {
  stroke: var(--hash-3);
}

.hash .h4 {
  stroke: var(--hash-4);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  /* 2px on top: capitals sit high in their line, this centres them. */
  padding: 2px 12px 0;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Sits at the right end of the row; the flag fills its left end. */
.tag-uk {
  position: relative;
  margin-left: auto;
  padding-left: 54px;
  overflow: hidden;
  background: #fff;
  color: var(--flag-blue);
}

.tag-uk svg {
  position: absolute;
  inset: 0 auto 0 0;
  width: 44px;
  height: 100%;
}

/* Sections */

section {
  padding-block: clamp(56px, 8vw, 104px);
}

.band {
  border-block: 1px solid var(--line);
  background: var(--wash);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

h1 {
  max-width: 22ch;
  font-size: clamp(1.75rem, 1.1rem + 4.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  max-width: 24ch;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
}

.intro {
  max-width: 60ch;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.label {
  margin-top: 36px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The dark opening block of the home page */

.hero {
  background: var(--ink);
  color: var(--paper);
}

/* The home page headline never breaks inside its short sentences. On a phone
   each one has its own line. From a tablet up it is set in three lines, two
   sentences to the first, at a size that always lets them fit (see the
   wider-screen rules at the end). */
.hero .wrap {
  /* Lets the headline size itself from the width it really has (the cqi
     unit), which a screen-width unit gets wrong when there is a scrollbar. */
  container-type: inline-size;
}

/* Each sentence has its own line. "Simple and affordable" is 9.8 times the
   type size and must fit on a line. */
.hero h1 {
  margin-top: 20px;
  font-size: min(1.1rem + 4.4vw, 100cqi / 10.4);
}

/* The three filings: a little smaller than the first sentence, one line each. */
.phrase {
  display: block;
  color: rgb(255 255 255 / 0.7);
  font-size: 0.58em;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

/* The first sentence is too long for one line. */
.phrase.wraps {
  color: inherit;
  font-size: 1em;
  font-weight: inherit;
  line-height: inherit;
  white-space: normal;
  text-wrap: balance;
}

/* The official form name after a sentence of the headline: a small grey pill. */
.form {
  display: inline-block;
  margin-left: 0.3em;
  padding: 0.35em 0.8em 0.25em;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  color: rgb(255 255 255 / 0.7);
  font-family: "Geist Mono", ui-monospace, monospace;
  /* Never under 10px, however small the headline gets on a phone. */
  font-size: max(0.49em, 0.625rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  vertical-align: 0.35em;
}

.hero-note {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--hero-note);
  font-size: 1.0625rem;
}

/* The handwritten yellow note in the hero: under the form on a phone, beside
   it on a wide screen. */

.sticky {
  max-width: 300px;
  margin-top: 40px;
  padding: 16px 20px 20px;
  background: #ffe45c;
  box-shadow: 0 14px 28px rgb(0 0 0 / 0.35);
  color: var(--ink);
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.12;
  rotate: -2deg;
  text-wrap: balance;
}

/* The waiting-list form in the hero: stacked on a phone, one row from a
   tablet up. */

.waitlist {
  max-width: 540px;
  margin-top: 28px;
}

.waitlist-row {
  display: grid;
  gap: 8px;
}

.waitlist input[type="email"] {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  color: var(--paper);
  font: inherit;
}

.waitlist input::placeholder {
  color: rgb(255 255 255 / 0.6);
}

.waitlist button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.waitlist input:focus-visible,
.waitlist button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.waitlist-lead {
  margin-bottom: 14px;
  font-size: 1.0625rem;
  font-weight: 600;
  text-wrap: balance;
}

/* Tall enough to press with a thumb, whether its text takes one line or two. */
.waitlist-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 8px;
  color: rgb(255 255 255 / 0.72);
  font-size: 0.9375rem;
  cursor: pointer;
}

.waitlist-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--paper);
}

.waitlist-botcheck:not(:empty) {
  margin-top: 14px;
}

.waitlist-small {
  margin-top: 8px;
  color: rgb(255 255 255 / 0.6);
  font-size: 0.875rem;
}

/* What the form says back: working, done, or what went wrong. */
.waitlist-status:empty {
  display: none;
}

.waitlist-status {
  margin-top: 14px;
  font-weight: 500;
}

.waitlist-status[data-kind="error"] {
  color: #ffb4a8;
}

/* Once someone has joined, the offer line and the fields give way to a
   confirmation panel: a tick, a headline and one line under it. */
.waitlist.is-done .waitlist-lead,
.waitlist.is-done .waitlist-fields {
  display: none;
}

.waitlist-status[data-kind="done"] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  margin-top: 0;
  padding: 20px 22px;
  border-radius: var(--radius-panel);
  background: var(--done);
  color: var(--ink);
}

.waitlist-status[data-kind="done"]::before {
  display: grid;
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--done);
  content: "\2713";
  font-size: 1.25rem;
  font-weight: 700;
  place-items: center;
}

.waitlist-status[data-kind="done"] strong {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.waitlist-status[data-kind="done"] span {
  font-size: 1rem;
  font-weight: 500;
}

.waitlist button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* For text that only a screen reader should get. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The planned functions, as cards */

.cards {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--paper);
}

.card p,
.points p {
  margin-top: 6px;
  color: var(--ink-soft);
}

/* The five principles, as a ruled list */

.points {
  display: grid;
  gap: 0 40px;
  margin-top: 36px;
}

.points li {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

/* Who it is for, as chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chips li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  font-weight: 500;
  text-wrap: balance;
}

.prose {
  max-width: 66ch;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.prose p + p {
  margin-top: 12px;
}

/* Footer */

footer {
  padding-block: 48px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* Two blocks: who is behind the site, then the notices. Side by side on a
   wide screen. */
.foot {
  display: grid;
  gap: 32px;
}

.foot p + p {
  margin-top: 12px;
}

.by {
  position: relative;
  top: 0.25em;
  margin-left: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* A link on its own line in the footer gets a taller area to press. */
.foot p > a:only-child {
  display: inline-block;
  margin-block: -8px;
  padding-block: 13px;
}

/* The privacy notice: one readable column of headed paragraphs */

.notice {
  max-width: 760px;
}

.notice h2 {
  margin-top: 40px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.notice ul {
  padding-left: 1.25em;
  list-style: disc;
}

.notice h2 + p,
.notice h2 + ul,
.notice ul + p {
  margin-top: 10px;
}

/* The "page not found" page */

.notfound {
  min-height: 60vh;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 28px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

/* Wider screens */

@media (min-width: 40rem) {
  .waitlist-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .cards,
  .points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 48px;
  }

  .sticky {
    margin-top: 0;
  }

  .cards,
  .points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
  }
}
