/* Fate Dept. holding site. Tokens follow brand-system/project/tokens.json.
   Brand colours are mode-stable, so the site has one light theme. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Anton";
  src: url("fonts/anton-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --ink: #151515;
  --acid: #e5ff38;
  --vermilion: #ed4336;
  --muted: #5a564e;
  --muted-on-acid: #4a4f1f;
  --rule: #d1ccc2;
  --rule-on-acid: #b9cf2c;

  --font-wordmark: "Archivo", "Arial Black", sans-serif;
  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-editorial: "Source Serif 4", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-label: "IBM Plex Mono", "Courier New", monospace;

  --gutter: clamp(16px, 5vw, 64px);
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--vermilion); text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
}
.skip:focus { left: 16px; top: 16px; }

.label {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
}

/* Header and footer ------------------------------------------------------ */

.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px var(--gutter);
}

.wordmark-small {
  display: inline-block;
  font-family: var(--font-wordmark);
  font-weight: 900;
  font-size: 22px;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.wordmark-small span { display: block; }

.foot {
  border-top: 1px solid var(--rule);
  margin-top: 64px;
  padding: 32px var(--gutter) 48px;
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.foot .signoff { font-family: var(--font-label); letter-spacing: 0.06em; margin: 0; }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot small { color: var(--muted); font-size: 14px; }
@media (min-width: 720px) {
  .foot { grid-template-columns: auto 1fr auto; align-items: baseline; }
  .foot nav ul { justify-content: center; }
  .foot--legal { grid-template-columns: 1fr auto; }
  .foot--legal nav ul { justify-content: flex-start; }
}

/* Home: the landing page is a Fate Dept. post at browser scale. --------
   Post grammar: wordmark top-left, label top-right, sign-off bottom-left,
   symbol bottom-right, all on one outer margin. */

.poster {
  --edge: clamp(20px, 4.5vw, 64px);
  min-height: 100vh;
  min-height: 100svh;
  background: var(--acid);
  color: var(--ink);
  padding: var(--edge);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "mark label"
    "line line"
    "sign symbol";
  gap: 16px 24px;
}

.poster .wordmark-corner {
  grid-area: mark;
  margin: 0;
  font-family: var(--font-wordmark);
  font-weight: 900;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.poster .wordmark-corner span { display: block; }

.poster .label {
  grid-area: label;
  justify-self: end;
  text-align: right;
  font-size: clamp(11px, 1vw, 14px);
  line-height: 1.6;
}
.poster .label span { white-space: nowrap; }
@media (max-width: 719px) {
  .poster .label span { display: block; }
  .poster .label .sep { display: none; }
}

.hero-line {
  grid-area: line;
  align-self: center;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  /* Three lines must fit between the corner rows on one screen. */
  font-size: min(21.5vw, calc((100vh - 2 * var(--edge) - 16rem) / 3));
  font-size: min(21.5vw, calc((100svh - 2 * var(--edge) - 16rem) / 3));
  line-height: 0.97;
  letter-spacing: -0.005em;
}
/* Phones and portrait screens: three lines, set low like a poster.
   Landscape: two full-width lines, centred. */
.hero-line .br-l { display: none; }
@media (orientation: portrait) {
  .hero-line { align-self: end; margin-bottom: 0.35em; }
}
@media (orientation: landscape) and (min-width: 720px) {
  .hero-line {
    font-size: min(calc((100vw - 2 * var(--edge)) / 7), calc((100vh - 2 * var(--edge) - 16rem) / 2));
    font-size: min(calc((100vw - 2 * var(--edge)) / 7), calc((100svh - 2 * var(--edge) - 16rem) / 2));
  }
  .hero-line .br-p { display: none; }
  .hero-line .br-l { display: inline; }
}

/* The red pen: one hand-drawn underline under the payoff. Marks only. */
.pen { position: relative; display: inline-block; }
.pen svg {
  position: absolute;
  left: -4%;
  bottom: -0.22em;
  width: 118%;
  height: 0.26em;
  overflow: visible;
  animation: pen 0.55s cubic-bezier(0.6, 0, 0.3, 1) 0.6s both;
}
@keyframes pen {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.poster .signoff {
  grid-area: sign;
  align-self: end;
  margin: 0;
  font-family: var(--font-label);
  font-size: clamp(13px, 1.25vw, 17px);
  letter-spacing: 0.06em;
}

.poster .symbol {
  grid-area: symbol;
  align-self: end;
  justify-self: end;
  width: clamp(60px, 8vw, 128px);
  height: auto;
  display: block;
}
.symbol .moon-still { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pen svg { animation: none; }
  .symbol .moon-orbit { display: none; }
  .symbol .moon-still { display: inline; }
}

/* After the poster: where to find us now. */
.find {
  padding: clamp(48px, 8vw, 112px) var(--gutter) 0;
}
.find h2 {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(24px, 4vw, 48px);
  max-width: 22ch;
}

.platforms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}
.platforms li + li { border-left: 1px solid var(--rule); }
.platforms a {
  display: block;
  padding: 20px 16px 24px 0;
  text-decoration: none;
}
.platforms li + li a { padding-left: 20px; }
.platforms .platform {
  display: block;
  font-weight: 800;
  font-size: clamp(22px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.platforms .handle {
  display: block;
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: 14px;
  color: var(--muted);
}
.platforms a:hover .platform,
.platforms a:focus-visible .platform {
  text-decoration: underline;
  text-decoration-color: var(--vermilion);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.16em;
}
@media (max-width: 560px) {
  .platforms { grid-template-columns: 1fr; }
  .platforms li + li { border-left: 0; border-top: 1px solid var(--rule); }
  .platforms li + li a { padding-left: 0; }
  .platforms a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; }
  .platforms .handle { margin-top: 0; }
}

/* Home footer: what this site is, for anyone who asks (and for Google). */
.foot--home { grid-template-columns: 1fr; gap: 24px; }
.foot--home .about { max-width: 38rem; font-size: 15px; line-height: 1.55; color: var(--muted); }
.foot--home .about p { margin: 0 0 8px; }
.foot--home .about strong { color: var(--ink); }
.foot--home .legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 32px; }
@media (min-width: 720px) {
  .foot--home { grid-template-columns: 1fr; }
  .foot--home nav ul { justify-content: flex-start; }
}

/* Policy pages ----------------------------------------------------------- */

.doc {
  padding: 24px var(--gutter) 0;
  max-width: calc(var(--measure) + 2 * var(--gutter));
}
.doc h1 {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 16px 0 12px;
}
.doc .meta { color: var(--muted); margin: 0 0 32px; }
.doc h2 {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 48px 0 12px;
}
.doc h3 { font-size: 17px; font-weight: 700; margin: 28px 0 8px; }
.doc p, .doc ul { margin: 0 0 16px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc code { font-family: var(--font-label); font-size: 0.88em; overflow-wrap: anywhere; }

.summary {
  background: var(--acid);
  padding: 24px;
  margin: 0 0 16px;
}
.summary .label { margin-bottom: 12px; }
.summary ul { margin: 0; padding-left: 1.2em; }
.summary li:last-child { margin-bottom: 0; }

.scopes { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 16px; }
.scopes th, .scopes td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); }
.scopes thead th { font-family: var(--font-label); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.scopes td:first-child { width: 42%; }
@media (max-width: 560px) {
  .scopes, .scopes tbody, .scopes tr, .scopes td { display: block; width: 100%; }
  .scopes thead { display: none; }
  .scopes tr { border-bottom: 1px solid var(--rule); padding: 12px 0; }
  .scopes td { border: 0; padding: 0 0 6px; }
  .scopes td:first-child { width: 100%; }
}
