/* Pace — shared foundation: fonts, colour tokens, base reset.
   Used by every homepage variation and the styleguide. */

@font-face {
  font-family: "Magister ST";
  src: url("../fonts/MagisterST_Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Magister Regular (a touch heavier than Book) and Italic, used by home-5 and the manifesto */
@font-face {
  font-family: "Magister ST Regular";
  src: url("../fonts/MagisterST_Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Magister ST";
  src: url("../fonts/MagisterST_Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Phonic Regular only (Verve: no Medium in the design); it also serves text set at 500 */
@font-face {
  font-family: "Phonic";
  src: url("../fonts/Phonic-Regular.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Neutrals */
  --pace-blank-page: #ffffff;
  --pace-taking-notes: #f2f0e8;
  --pace-roast-of: #4f341d;
  --pace-after-hours: #391818;
  --pace-blackberry: #1c0101;

  /* Accents */
  --pace-touch-grass: #005a3b;
  --pace-daydream: #689fe6;
  --pace-soft-launch: #e5aba9;
  --pace-coffee-stain: #774141;
  --pace-friday-5pm: #cc6c4f;
  --pace-friday-5pm-bright: #ff3434;
  --pace-raspberry-pi: #d33270;
  --pace-raspberry-pi-bright: #ff0092;

  /* Roles */
  --pace-bg: var(--pace-taking-notes);
  --pace-ink: var(--pace-blackberry);

  /* Type */
  --pace-font-display: "Magister ST", Georgia, "Times New Roman", serif;
  --pace-font-brand: "Phonic", "DM Sans", system-ui, sans-serif;
  --pace-font-body: "DM Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --pace-page-max: 1440px;
  --pace-gutter: 16px;
}

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

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

body {
  margin: 0;
  background: var(--pace-bg);
  color: var(--pace-ink);
  font-family: var(--pace-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Brand mark: logo icon + "Pace" wordmark */
.pace-logo {
  display: inline-flex;
  align-items: center;
  gap: 10.5px;
  color: var(--pace-ink);
  text-decoration: none;
}

.pace-logo__icon {
  position: relative;
  width: 23.524px;
  height: 23.525px;
  flex: none;
}

.pace-logo__icon img {
  position: absolute;
  inset: 0;
}

.pace-logo__icon::after {
  content: "";
  position: absolute;
  left: 9.94px;
  top: 9.94px;
  width: 3.638px;
  height: 3.638px;
  border-radius: 0.504px;
  background: var(--pace-ink);
}

.pace-logo__word {
  font-family: var(--pace-font-brand);
  font-size: 34.151px;
  line-height: 0.91;
  letter-spacing: -2.049px;
}

/* Large, light-on-dark logo (home-2) */
.pace-logo--lg {
  gap: 15.2px;
  color: #fff;
}

.pace-logo--lg .pace-logo__icon {
  width: 34.148px;
  height: 34.148px;
}

.pace-logo--lg .pace-logo__icon::after {
  left: 14.44px;
  top: 14.43px;
  width: 5.281px;
  height: 5.281px;
  border-radius: 0.732px;
  background: #fff;
}

.pace-logo--lg .pace-logo__word {
  font-weight: 500;
  font-size: 49.573px;
  letter-spacing: -2.9744px;
}

/* Waitlist form: frosted field + dark button. Pages set position/width. */
.waitlist {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 3px 3px 3px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.waitlist__input {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--pace-font-body);
  font-size: 16px;
  font-variation-settings: "opsz" 14;
  color: #000;
  outline: none;
}

.waitlist__input::placeholder {
  color: #000;
  opacity: 1;
}

.waitlist__button {
  position: relative;
  flex: none;
  width: 134px;
  height: 42px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  background: #1e0003;
  cursor: pointer;
  transition: background 0.2s ease;
}

.waitlist__button:hover {
  background: var(--pace-after-hours);
}

.waitlist__button:focus-visible {
  outline: 2px solid var(--pace-daydream);
  outline-offset: 2px;
}

.waitlist__button img {
  position: absolute;
  transform: translate(-50%, -50%);
}

/* Text selection: brand colour by default; with pace-selection.js the
   native highlight is hidden and Pace shapes are drawn behind the text. */
::selection {
  background: var(--pace-soft-launch);
  color: var(--pace-blackberry);
}

.pace-select-shapes ::selection {
  background: transparent;
}

/* Plain mode: the native highlight, in the accent colour the script picks per selection */
.pace-select-plain ::selection {
  background: var(--pace-select-colour, var(--pace-soft-launch));
  color: var(--pace-blackberry);
}

.pace-select-shapes input::selection,
.pace-select-shapes textarea::selection {
  background: var(--pace-soft-launch);
}

.pace-selection-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* On colourful/dark pages the shapes sit behind the text instead of
   multiplying over it. Content that should sit above them needs z-index > 1. */
.pace-select-behind .pace-selection-layer {
  z-index: 1;
  mix-blend-mode: normal;
}

/* ------------------------------------------------------------------
   Typography scale
   Display sizes come from the homepage designs (90 / 69.4px Magister).
   Use the classes directly, or wrap running content in .pace-prose.
   ------------------------------------------------------------------ */
:root {
  --pace-h1: clamp(44px, 6.25vw, 90px);
  --pace-h2: clamp(36px, 4.818vw, 69.379px);
  --pace-h3: clamp(30px, 3.4vw, 48px);
  --pace-h4: clamp(24px, 2.4vw, 34px);
  --pace-h5: 22px;
  --pace-h6: 14px;
  --pace-lead: 20px;
  --pace-body: 16px;
  --pace-small: 14px;
}

.pace-h1,
.pace-prose h1 {
  font-family: var(--pace-font-display);
  font-weight: 400;
  font-size: var(--pace-h1);
  line-height: 0.88;
  letter-spacing: -0.05em;
}

.pace-h2,
.pace-prose h2 {
  font-family: var(--pace-font-display);
  font-weight: 400;
  font-size: var(--pace-h2);
  line-height: 1;
  letter-spacing: -0.05em;
}

.pace-h3,
.pace-prose h3 {
  font-family: var(--pace-font-display);
  font-weight: 400;
  font-size: var(--pace-h3);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.pace-h4,
.pace-prose h4 {
  font-family: var(--pace-font-display);
  font-weight: 400;
  font-size: var(--pace-h4);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.pace-h5,
.pace-prose h5 {
  font-family: var(--pace-font-body);
  font-weight: 500;
  font-size: var(--pace-h5);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.pace-h6,
.pace-prose h6 {
  font-family: var(--pace-font-body);
  font-weight: 500;
  font-size: var(--pace-h6);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pace-lead {
  font-size: var(--pace-lead);
  line-height: 1.5;
}

.pace-small {
  font-size: var(--pace-small);
  line-height: 1.5;
}

.pace-prose {
  font-size: var(--pace-body);
  line-height: 1.6;
}

.pace-prose > * {
  margin: 0 0 1em;
}

.pace-prose > :is(h1, h2, h3, h4) {
  margin: 1.2em 0 0.4em;
}

.pace-prose > :is(h5, h6) {
  margin: 2em 0 0.6em;
}

.pace-prose > :first-child {
  margin-top: 0;
}

.pace-prose a {
  color: inherit;
  text-decoration-color: var(--pace-raspberry-pi);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.pace-prose a:hover {
  color: var(--pace-raspberry-pi);
}

/* Bullets are a small Pace shape (stepped cross) */
.pace-prose ul {
  padding: 0;
  list-style: none;
}

.pace-prose ul > li {
  position: relative;
  padding-left: 1.75em;
}

.pace-prose ul > li + li,
.pace-prose ol > li + li {
  margin-top: 0.4em;
}

.pace-prose ul > li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.45em;
  width: 0.75em;
  height: 0.75em;
  background: url("../img/pace-1.svg") center / contain no-repeat;
}

.pace-prose ol {
  padding: 0;
  list-style: none;
  counter-reset: pace-ol;
}

.pace-prose ol > li {
  position: relative;
  padding-left: 1.75em;
  counter-increment: pace-ol;
}

.pace-prose ol > li::before {
  content: counter(pace-ol);
  position: absolute;
  left: 0;
  top: -0.05em;
  font-family: var(--pace-font-display);
  font-size: 1.25em;
  line-height: 1.3;
  color: var(--pace-friday-5pm);
}

.pace-prose blockquote {
  margin-left: 0;
  padding-left: 1.25em;
  border-left: 3px solid var(--pace-soft-launch);
  font-family: var(--pace-font-display);
  font-size: var(--pace-h4);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------------------
   Grid: 12 columns, 24px gutter, 1170px content (matches the home-1
   video width) inside the 1440px page, i.e. 135px side margins.
   ------------------------------------------------------------------ */
:root {
  --pace-grid-columns: 12;
  --pace-grid-gap: 24px;
  --pace-content-max: 1170px;
}

.pace-container {
  width: min(var(--pace-content-max), calc(100% - 2 * var(--pace-gutter)));
  margin-inline: auto;
}

.pace-grid {
  display: grid;
  grid-template-columns: repeat(var(--pace-grid-columns), minmax(0, 1fr));
  gap: var(--pace-grid-gap);
}

@media (max-width: 900px) {
  :root {
    --pace-grid-columns: 6;
    --pace-grid-gap: 16px;
  }
}

@media (max-width: 560px) {
  :root {
    --pace-grid-columns: 4;
  }
}

/* ------------------------------------------------------------------
   Logo mark motion (subtle): on hover the mark turns a quarter with a
   little overshoot while the core screws the other way; on click it
   beats twice. The mark is symmetric, so it always lands where it began.
   pace-logo.js adds the classes so a started turn always finishes.
   ------------------------------------------------------------------ */
.pace-logo__icon,
.pace-logo__icon::after {
  transform-origin: 50% 50%;
}

.pace-logo .pace-logo__icon.is-turn {
  animation: pace-logo-turn 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pace-logo .pace-logo__icon.is-turn::after {
  animation: pace-logo-screw 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.pace-logo .pace-logo__icon.is-beat {
  animation: pace-logo-beat 0.6s cubic-bezier(0.3, 0, 0.2, 1);
}

@keyframes pace-logo-turn {
  0% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(30deg) scale(0.86); }
  100% { transform: rotate(90deg) scale(1); }
}

@keyframes pace-logo-screw {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-180deg); }
}

@keyframes pace-logo-beat {
  0% { transform: scale(1); }
  15% { transform: scale(1.18); }
  32% { transform: scale(0.96); }
  48% { transform: scale(1.1); }
  70%, 100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pace-logo .pace-logo__icon.is-turn,
  .pace-logo .pace-logo__icon.is-turn::after,
  .pace-logo .pace-logo__icon.is-beat {
    animation: none;
  }
}
