/* Level Up one-page site. Plain CSS, written for phones first.

   The look borrows from road signs: the Overpass typeface is drawn from
   US highway lettering, the green is guide-sign green, and amber and red
   are the same warning colors a rank grid uses. */

@font-face {
  font-family: "Overpass";
  src: url("fonts/overpass-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F7F3;
  --white: #FFFFFF;
  --ink: #101E1A;
  --muted: #48544E;
  --line: #CCD1C8;
  --land: #E3E7DD;
  --green: #00664F;
  --green-dark: #004D3B;
  --amber: #F2B632;
  --red: #B3261E;

  --font: "Overpass", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gutter: 1rem;
  --measure: 38rem;
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.3rem);
}

h3 {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

a {
  color: var(--green);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--green-dark);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 5.5rem;
}

[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  border-radius: 0.4rem;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus {
  top: 0.5rem;
  color: var(--paper);
}

/* ---------- Signs: the wordmark and the buttons ---------- */

.sign {
  display: inline-block;
  padding: 0.6em 0.75em 0.42em;
  border-radius: 0.5em;
  background: var(--green);
  box-shadow: inset 0 0 0 0.13em var(--green), inset 0 0 0 0.24em var(--white);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.sign:hover {
  background: var(--green-dark);
  box-shadow: inset 0 0 0 0.13em var(--green-dark), inset 0 0 0 0.24em var(--white);
  color: var(--white);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.9rem 1.5rem 0.72rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--green);
  box-shadow: inset 0 0 0 3px var(--green), inset 0 0 0 5px var(--white);
  color: var(--white);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--green-dark);
  box-shadow: inset 0 0 0 3px var(--green-dark), inset 0 0 0 5px var(--white);
  color: var(--white);
}

.button-small {
  min-height: 2.75rem;
  padding: 0.6rem 0.9rem 0.45rem;
  border-radius: 0.55rem;
  box-shadow: inset 0 0 0 2px var(--green), inset 0 0 0 3.5px var(--white);
  font-size: 1rem;
}

.button-small:hover {
  box-shadow: inset 0 0 0 2px var(--green-dark), inset 0 0 0 3.5px var(--white);
}

.button-light {
  width: 100%;
  background: var(--white);
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 5px var(--green);
  color: var(--green);
}

.button-light:hover {
  background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--green-dark);
  color: var(--green-dark);
}

.button[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.bar .button {
  margin-left: auto;
}

.site-nav {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.wide {
  display: none;
}

/* ---------- Hero ---------- */

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

.hero-grid {
  display: grid;
  gap: 2.25rem;
}

.hero-words > * + * {
  margin-top: 1.1rem;
}

.support {
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.45;
}

.hero .button {
  width: 100%;
}

.for-whom {
  max-width: 30rem;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- The example map ---------- */

.map svg {
  display: block;
  width: 100%;
  max-width: 30rem;
  height: auto;
  border-radius: 1rem;
}

.map .land {
  fill: var(--land);
}

.map .roads {
  fill: none;
  stroke: var(--paper);
  stroke-linecap: round;
}

.dot circle {
  stroke: var(--paper);
  stroke-width: 2;
}

.dot text {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.dot text.small {
  font-size: 13.5px;
}

.dot.top circle {
  fill: var(--green);
}

.dot.mid circle {
  fill: var(--amber);
}

.dot.low circle {
  fill: var(--red);
}

.dot.top text,
.dot.low text {
  fill: var(--white);
}

.dot.mid text {
  fill: var(--ink);
}

.map .shop {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.5;
}

/* The one moving moment on the page: the dots land from the shop outward. */
@media (prefers-reduced-motion: no-preference) {
  .dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: land 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  }

  .dot.ring-1 {
    animation-delay: 0.15s;
  }

  .dot.ring-2 {
    animation-delay: 0.3s;
  }

  .dot.ring-3 {
    animation-delay: 0.45s;
  }

  @keyframes land {
    from {
      opacity: 0;
      transform: scale(0.4);
    }
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.key {
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
}

.key.top {
  background: var(--green);
}

.key.mid {
  background: var(--amber);
}

.key.low {
  background: var(--red);
}

.key.shop {
  border: 3px solid var(--ink);
}

.map figcaption p {
  max-width: 30rem;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  gap: 1.25rem;
}

.body {
  max-width: var(--measure);
}

.body > * + * {
  margin-top: 1rem;
}

.lead {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
}

.define {
  color: var(--muted);
  font-size: 1rem;
}

.body > .sub {
  margin-top: 2.5rem;
}

.body > .after-steps {
  margin-top: 2rem;
}

/* Terms laid out like a rate card: what it is on the left, the detail on the right. */
.terms {
  border-top: 2px solid var(--ink);
}

.body > .terms {
  margin-top: 1.5rem;
}

.terms > div {
  display: grid;
  gap: 0.25rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.terms dt {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.terms .big {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
}

.promise {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
}

.promise + .define {
  margin-top: 0.5rem;
}

/* Steps are a real sequence, so they are numbered. */
.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 1rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding-top: 0.14em;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  line-height: 1;
}

.steps h3,
.steps p {
  grid-column: 2;
}

.steps p {
  margin-top: 0.2rem;
}

/* A checklist an owner can hold their own business against. */
.checks {
  display: grid;
  gap: 0.9rem;
}

.checks li {
  position: relative;
  padding-left: 2.4rem;
}

.checks li::before {
  content: "";
  position: absolute;
  top: 0.1em;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.3rem;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.6l3.1 3.1 6.5-6.9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
}

/* The never list: each line carries a no-entry mark. */
.never-list {
  display: grid;
  gap: 0.75rem;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
}

.never-list li {
  position: relative;
  padding-left: 2.1em;
}

.never-list li::before {
  content: "";
  position: absolute;
  top: -0.06em;
  left: 0;
  width: 1.25em;
  height: 1.25em;
  border: 0.17em solid var(--red);
  border-radius: 50%;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 0.085em),
    var(--red) calc(50% - 0.085em),
    var(--red) calc(50% + 0.085em),
    transparent calc(50% + 0.085em)
  );
}

.body > .never-list + p {
  margin-top: 1.5rem;
}

/* Questions open and close without any script. */
.qa {
  border-top: 2px solid var(--ink);
}

.qa > details {
  margin-top: 0;
  border-bottom: 1px solid var(--line);
}

.qa summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: "+";
  flex: none;
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.qa details[open] summary::after {
  content: "\2212";
}

.answer {
  padding-bottom: 1.1rem;
}

.answer > * + *,
.answer [data-guarantee] > * + * {
  margin-top: 0.75rem;
}

/* ---------- The form: one big green sign at the end of the road ---------- */

.check {
  position: relative;
  padding-block: 3rem;
  background: var(--green);
  color: var(--white);
}

.check::before {
  content: "";
  position: absolute;
  inset: 0.6rem;
  border: 3px solid var(--white);
  border-radius: 1rem;
  pointer-events: none;
}

.check .wrap {
  padding-inline: calc(var(--gutter) + 0.75rem);
}

.check-sign {
  max-width: 36rem;
  margin-inline: auto;
}

.check-intro {
  margin-top: 0.75rem;
  font-size: 1.15rem;
}

.check form {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.field input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.65rem 0.8rem 0.5rem;
  border: 2px solid var(--white);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.check :focus-visible {
  outline-color: var(--amber);
}

.hint {
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

.fine {
  font-size: 0.95rem;
}

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

.form-status {
  font-weight: 700;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  padding: 0.7rem 0.9rem 0.6rem;
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--red);
}

.form-done {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 0.7rem;
  background: var(--white);
  color: var(--ink);
}

.form-done p {
  margin-top: 0.5rem;
}

/* ---------- Email line under the form ---------- */

.check .contact {
  margin-top: 1.5rem;
}

.check .contact a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.check .contact a:hover {
  color: var(--white);
  text-decoration-thickness: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem 3rem;
  color: var(--muted);
  font-size: 1rem;
}

.site-footer p + p {
  margin-top: 0.6rem;
}

.site-footer .name {
  color: var(--ink);
  font-weight: 800;
}

/* ---------- Wider screens ---------- */

@media (min-width: 30rem) {
  .narrow {
    display: none;
  }

  .wide {
    display: inline;
  }

  .hero .button {
    width: auto;
  }
}

@media (min-width: 40rem) {
  .terms > div {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }

  .check {
    padding-block: 4.5rem;
  }

  .check::before {
    inset: 1rem;
  }
}

@media (min-width: 56rem) {
  .site-nav {
    display: flex;
  }

  .bar .button {
    margin-left: 0;
  }
}

@media (min-width: 60rem) {
  .hero {
    padding-block: 4rem 5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: center;
  }

  .section {
    padding-block: 4.5rem;
  }

  .split {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 3rem;
  }
}
