/* AutoOfficeNow website. Colours, type and the slanted blue marks come from the app's own design
   (apps/ui/static/styles/tokens.css in the app repo), so the site and the app look like one thing. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light dark;

  --paper: #f4f2ec;
  --paper2: #eae6dc;
  --sheet: #ffffff;
  --ink: #1b1e25;
  --ink2: #4d525e;
  --rule: #d9d4c8;
  --rule2: #b9b2a2;
  --brand: #006bfb;
  --brand-strong: #0057cc;
  --brandtx: #006bfb;
  --link: #0057cc;
  --onbrand: #ffffff;
  --shadow: 0 24px 60px rgba(27, 30, 37, 0.16), 0 4px 12px rgba(27, 30, 37, 0.08);

  --gutter: clamp(16px, 4vw, 56px);
  --wide: 1320px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1916;
    --paper2: #211f1b;
    --sheet: #292621;
    --ink: #ede8de;
    --ink2: #c2bbae;
    --rule: #3a3630;
    --rule2: #565046;
    --brandtx: #5aa2ff;
    --link: #5aa2ff;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--rule2) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: clip;
}

::selection {
  background: var(--brand);
  color: var(--onbrand);
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2.5px;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--onbrand);
  font-weight: 700;
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

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

/* Header */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.site-head .logo img {
  width: auto;
  height: 46px;
}

.site-head nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-weight: 600;
  font-size: 1rem;
}

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

.site-head nav a:hover {
  color: var(--link);
}

/* The blue swipe behind a word, as in the app */

.swipe {
  position: relative;
  display: inline-block;
  isolation: isolate;
  color: var(--onbrand);
  padding-inline: 0.12em;
}

.swipe::before {
  content: "";
  position: absolute;
  inset: 0.02em -0.06em -0.02em;
  z-index: -1;
  background: var(--brand);
  border-radius: 3px;
  transform: skew(-10deg) rotate(-2deg);
  transform-origin: left center;
  animation: swipe-in 700ms cubic-bezier(0.16, 1, 0.3, 1) 150ms backwards;
}

@keyframes swipe-in {
  from {
    transform: skew(-10deg) rotate(-2deg) scaleX(0);
  }
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
  padding-block: clamp(24px, 4vw, 56px) clamp(56px, 8vw, 112px);
}

.hero h1 {
  font-size: clamp(3.25rem, 6.6vw, 6rem);
  font-stretch: 80%;
  font-weight: 800;
  line-height: 0.98;
}

.hero .lead {
  margin-top: 28px;
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  line-height: 1.42;
  color: var(--ink2);
  max-width: 34ch;
}

.hero .actions {
  margin-top: 32px;
}

.button {
  display: inline-block;
  padding: 15px 24px;
  background: var(--brand);
  color: var(--onbrand);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 140ms ease-out;
}

.button:hover {
  background: var(--brand-strong);
}

.hero .note {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--ink2);
  max-width: 36ch;
}

.hero figure {
  margin: 0;
  /* Runs off the right edge of the window, like an app open on a bigger desk. */
  margin-right: calc(-1 * max(var(--gutter), (100vw - var(--wide)) / 2 + var(--gutter)));
}

.shot {
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hero .shot {
  width: 100%;
  min-width: 720px;
  border-radius: 12px 0 0 12px;
}

figcaption {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--ink2);
}

/* The four steps */

.steps {
  border-top: 1px solid var(--rule);
}

.steps-title {
  padding-top: clamp(56px, 7vw, 96px);
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-stretch: 84%;
  max-width: 18ch;
}

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0 0 clamp(40px, 6vw, 80px);
}

.step {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 5fr) minmax(0, 7fr);
  gap: 0 clamp(24px, 3vw, 48px);
  align-items: start;
  padding-block: clamp(44px, 6vw, 80px);
}

.step + .step {
  border-top: 1px solid var(--rule);
}

.num {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: 4.4rem;
  text-align: center;
  font-size: 4.75rem;
  font-weight: 800;
  font-stretch: 68%;
  line-height: 1;
  color: var(--brandtx);
  transition: color 180ms ease-out;
}

.num::before {
  content: "";
  position: absolute;
  inset: -0.02em 0 -0.04em;
  z-index: -1;
  background: var(--brand);
  border-radius: 3px;
  transform: skew(-10deg) rotate(-2deg) scaleX(0);
  transform-origin: left center;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.step.is-current .num {
  color: var(--onbrand);
}

.step.is-current .num::before {
  transform: skew(-10deg) rotate(-2deg) scaleX(1);
}

.step h3 {
  font-size: clamp(1.9rem, 2.8vw, 2.5rem);
  font-stretch: 84%;
}

.step p {
  margin-top: 16px;
  color: var(--ink2);
  max-width: 46ch;
}

.step .show {
  margin: 0;
  min-width: 0;
}

/* Small pieces drawn in the app's own language */

.mini-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-steps li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.mini-steps b {
  font-size: 1.875rem;
  font-weight: 800;
  font-stretch: 68%;
  line-height: 1;
  color: var(--brandtx);
  text-align: center;
}

.mini-steps span {
  font-weight: 700;
  font-stretch: 92%;
  line-height: 1.3;
}

.mini-steps small {
  display: block;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--ink2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 9px 16px;
  background: var(--sheet);
  border: 1px solid var(--rule2);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.0625rem;
}

/* Stays on your computer */

.local {
  background: var(--brand);
  color: var(--onbrand);
}

.local .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  padding-block: clamp(64px, 9vw, 128px);
}

.local h2 {
  font-size: clamp(2.5rem, 5.4vw, 4.75rem);
  font-stretch: 80%;
}

.local .more {
  margin-top: 28px;
}

.local a {
  color: var(--onbrand);
  font-weight: 700;
}

.local dl {
  margin: 0;
  display: grid;
  gap: 26px;
}

.local dt {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 800;
  font-stretch: 88%;
  line-height: 1.15;
}

.local dd {
  margin: 6px 0 0;
  max-width: 52ch;
}

/* Google data */

.google {
  padding-block: clamp(64px, 8vw, 112px);
}

.google h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-stretch: 84%;
  max-width: 16ch;
}

.google .cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  margin-top: 32px;
}

.google .cols p + p {
  margin-top: 16px;
}

.google .text {
  color: var(--ink2);
  max-width: 46ch;
}

table {
  width: 100%;
  align-self: start;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 16px 16px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

thead th {
  padding-top: 0;
  font-size: 1rem;
  color: var(--ink2);
  font-weight: 600;
  border-bottom-color: var(--rule2);
}

tbody th {
  font-weight: 800;
  font-stretch: 88%;
  white-space: nowrap;
}

/* Contact */

.contact {
  border-top: 1px solid var(--rule);
  padding-block: clamp(56px, 7vw, 96px);
}

.contact h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-stretch: 84%;
}

.contact p {
  margin-top: 14px;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* Footer */

.site-foot {
  background: var(--paper2);
  font-size: 0.9375rem;
  color: var(--ink2);
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 28px;
}

.site-foot a {
  color: var(--ink);
}

.site-foot .small {
  flex-basis: 100%;
}

/* Reading pages */

.doc {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  padding-block: clamp(32px, 5vw, 64px) clamp(64px, 8vw, 112px);
}

.doc-nav {
  position: sticky;
  top: 24px;
  font-size: 1rem;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.doc-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.doc-nav a {
  color: var(--ink2);
  text-decoration: none;
}

.doc-nav a:hover {
  color: var(--link);
  text-decoration: underline;
}

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

.doc-body h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-stretch: 80%;
}

.doc-body .updated {
  margin-block: 14px 24px;
  color: var(--ink2);
}

.doc-body h2 {
  margin-top: 2.4em;
  margin-bottom: 0.5em;
  font-size: 1.75rem;
  font-stretch: 86%;
  line-height: 1.12;
}

.doc-body p,
.doc-body ul {
  margin-block: 0 1em;
}

.doc-body ul {
  padding-left: 1.2em;
}

.doc-body li + li {
  margin-top: 0.4em;
}

.doc-body li::marker {
  color: var(--brandtx);
}

.doc-body code {
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

/* Not found */

.lost {
  padding-block: clamp(64px, 12vw, 160px);
}

.lost h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-stretch: 80%;
}

.lost p {
  margin-top: 20px;
}

/* Narrower windows */

@media (max-width: 1000px) {
  .hero,
  .local .wrap,
  .google .cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .lead,
  .hero .note {
    max-width: 46ch;
  }

  .hero figure {
    overflow: clip;
  }

  .hero figcaption {
    padding-right: var(--gutter);
  }

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

  .step .show {
    grid-column: 1 / -1;
    margin-top: 28px;
  }

  .num {
    width: 3.6rem;
    font-size: 3.75rem;
  }

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

  .doc-nav {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1.0625rem;
  }

  .site-head .logo img {
    height: 38px;
  }

  .site-head nav a[href="#how"],
  .site-head nav a[href="#google"] {
    display: none;
  }

  .step {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    column-gap: 14px;
  }

  .num {
    width: 2.9rem;
    font-size: 3rem;
  }

  .hero .shot {
    min-width: 560px;
  }

  th,
  td {
    padding-right: 10px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
