/* The holding page's whole stylesheet.
 *
 * **Copied from `packages/tokens`, not imported**, because this folder builds
 * with no dependencies. It is the same values under the same names, so the
 * page is recognisably the product; it is also a second copy, and it lives
 * only until the real home page replaces this one. */

@font-face {
  font-family: "Space Grotesk";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/space-grotesk-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-sans-600.woff2") format("woff2");
}

:root {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --paper: #f7f5f0;
  --surface: #ffffff;
  --line-strong: #ddd8cb;
  --text: #15181c;
  --text-body: #3e434a;
  --text-muted: #6b6f76;
  --mark: #103a63;
  /* The upper cut in the brand's gold, on either ground — `b-g-w.svg` on
     light, `w-g-b.svg` on dark. */
  --mark-arch: #d9a44e;
  --link: #1a5fa3;
  --link-hover: #b07b2c;
  --callout: #e6eef7;
  --marker: #d9a44e;
  --now: #1a5fa3;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1013;
    --surface: #171a1e;
    --line-strong: #2e333a;
    --text: #f4f2ed;
    --text-body: #d2d5d9;
    --text-muted: #9ba1a8;
    /* The brand's bone, as `w.svg` has it — the mark does not take an
       interface colour, because a logo in a different colour is a different
       logo. */
    --mark: #f7f5f0;
    --link: #5aa9e6;
    --link-hover: #d9a44e;
    --callout: #12293d;
    --marker: #d9a44e;
    --now: #5aa9e6;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

.frame {
  margin: 0 auto;
  max-width: 1200px;
  padding: 32px 24px 0;
}

.mark {
  display: inline-block;
  height: 64px;
  color: var(--mark);
  line-height: 0;
}
.mark svg {
  width: auto;
  height: 100%;
}
.mark .arch {
  fill: var(--mark-arch, currentColor);
}

/* ---- home: the headline at the top, the line at the foot ---- */

.home .frame {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
  min-height: 100dvh;
}

.home h1 {
  margin: 48px 0 0;
  max-width: 15ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
}

.prelude {
  margin: 24px 0 0;
  max-width: 540px;
  text-wrap: pretty;
}

.foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--line-strong);
}

.label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
}
.colophon a {
  color: var(--text-muted);
}
.colophon a:hover {
  color: var(--text-body);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .frame {
    padding: 40px 40px 0;
  }
  .mark {
    height: 88px;
  }
  .home h1 {
    margin-top: 72px;
    font-size: 68px;
    line-height: 1.02;
    letter-spacing: -0.035em;
  }
  /* One line now, so it can be set larger than body text without reading
     as a paragraph somebody is expected to study. */
  .prelude {
    margin-top: 32px;
    max-width: 720px;
    font-size: 19px;
    line-height: 1.45;
  }
  .foot {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    padding: 32px 0;
  }
}

/* ---- the headline that corrects itself ----
 *
 * Arrives as "like every other", then a marker is drawn through "every other",
 * the struck words step back, and "no other" lands. Once, and it stays there.
 * Space for "no other" is held from the start, so nothing reflows when it
 * arrives. With reduced motion the page opens on the finished sentence. */

.home h1.tagline {
  max-width: 20ch;
}

.tagline .was {
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  animation: step-back 400ms ease-out 1300ms both;
}

/* The marker: a thick stroke in the brand gold, a touch off level, drawn left
   to right the way a hand would. */
.tagline .was::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  top: 54%;
  height: 0.09em;
  border-radius: 0.05em;
  background: var(--marker);
  transform: rotate(-1deg) scaleX(0);
  transform-origin: left center;
  animation: strike 520ms cubic-bezier(0.65, 0, 0.35, 1) 800ms forwards;
}

.tagline .now {
  display: inline-block;
  white-space: nowrap;
  color: var(--now);
  opacity: 0;
  transform: translateY(0.18em) rotate(-3deg);
  animation: land 520ms cubic-bezier(0.34, 1.56, 0.64, 1) 1550ms forwards;
}

@keyframes strike {
  to {
    transform: rotate(-1deg) scaleX(1);
  }
}
@keyframes step-back {
  to {
    color: var(--text-muted);
  }
}
@keyframes land {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- coming soon, and counting: nothing, then one dot, two, three ---- */

.dots {
  display: inline-block;
  margin-left: 0.1em;
  letter-spacing: 0.1em;
}
.dots span {
  opacity: 0;
  animation: dot 2000ms steps(1, end) infinite;
}
.dots span:nth-child(1) {
  animation-name: dot-one;
}
.dots span:nth-child(2) {
  animation-name: dot-two;
}
.dots span:nth-child(3) {
  animation-name: dot-three;
}
@keyframes dot-one {
  0%,
  24% {
    opacity: 0;
  }
  25%,
  100% {
    opacity: 1;
  }
}
@keyframes dot-two {
  0%,
  49% {
    opacity: 0;
  }
  50%,
  100% {
    opacity: 1;
  }
}
@keyframes dot-three {
  0%,
  74% {
    opacity: 0;
  }
  75%,
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tagline .was,
  .tagline .was::after,
  .tagline .now,
  .dots span {
    animation: none;
  }
  .tagline .was {
    color: var(--text-muted);
  }
  .tagline .was::after {
    transform: rotate(-1deg) scaleX(1);
  }
  .tagline .now,
  .dots span {
    opacity: 1;
    transform: none;
  }
}

/* ---- the policies: prose at 720px ---- */

.legal .frame {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.policy {
  flex: 1;
  max-width: 720px;
  padding: 56px 0 72px;
}
.policy h1 {
  margin: 12px 0 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.policy h2 {
  margin: 40px 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.policy h3 {
  margin: 28px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.policy p,
.policy ul {
  margin: 0 0 14px;
}
.policy ul {
  padding-left: 20px;
}
.policy li {
  margin-bottom: 6px;
}
.policy strong {
  font-weight: 600;
  color: var(--text);
}
.policy a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.callout {
  margin: 0 0 28px;
  padding: 14px 16px;
  border-radius: 9px;
  background: var(--callout);
}
.callout p:last-child {
  margin-bottom: 0;
}

/* On a policy the mark is the way home, not the headline; full size would
   crowd a page that exists to be read. */
.legal .mark {
  height: 48px;
}
