/* Loom — one stylesheet, no build step, no scripts.
   Everything here is served from this origin: the only requests a load makes are
   this file, fonts.css, two fonts, the logo and two preloaded faces. */

:root {
  --ink: #0a0805;
  --ink-soft: #0f0b06;
  --text: #f4efe3;
  --muted: #9c9280;
  --gold: #ffc72c;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.055);

  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --rail: 1120px;
  --pad: clamp(20px, 5vw, 44px);
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

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

html {
  background: var(--ink);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The loom: two hairline thread sets at right angles, thinning out downward, and
   one pool of gold light behind the headline. Fixed, so the page scrolls over it
   instead of repainting a taller background. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 199, 44, 0.05) 0, rgba(255, 199, 44, 0.05) 1px, transparent 1px, transparent 84px),
    repeating-linear-gradient(180deg, rgba(255, 199, 44, 0.035) 0, rgba(255, 199, 44, 0.035) 1px, transparent 1px, transparent 84px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 46%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 46%, transparent 92%);
}

body::after {
  content: "";
  position: fixed;
  z-index: 0;
  top: -18vmax;
  right: -12vmax;
  width: 62vmax;
  height: 62vmax;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 199, 44, 0.09) 0%, rgba(255, 199, 44, 0.035) 38%, transparent 68%);
}

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--rail);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding-inline: var(--pad);
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

/* On a wide screen the content sits between two hairlines, like a page in a
   ledger. Below that the rails would only squeeze the text. */
@media (min-width: 1180px) {
  .shell {
    border-inline: 1px solid var(--line-soft);
  }
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: clamp(18px, 3vh, 26px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.025em;
}

.meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- hero ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Tuned so the whole page fits a 1440x900 laptop without scrolling; on a
     shorter window it scrolls instead of squeezing the type. */
  padding-block: clamp(38px, 8vh, 78px);
}

.headline {
  margin: 0 0 clamp(26px, 4.4vw, 44px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  animation: rise 0.55s var(--ease) both;
}

.headline .period { color: var(--gold); }

.split {
  display: grid;
  gap: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
  padding-top: clamp(22px, 3vw, 30px);
  animation: rise 0.6s 0.08s var(--ease) both;
}

.lede {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.62;
  color: #ddd5c5;
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px clamp(20px, 3vh, 28px);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.foot p { margin: 0; }

.foot nav {
  display: flex;
  gap: 20px;
}

/* ---------- links, focus, motion ---------- */

a { color: inherit; }

.foot a {
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.foot a:hover { color: var(--text); border-bottom-color: var(--line); }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 5;
  padding: 10px 14px;
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}

.skip:focus { top: 12px; }

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

::selection {
  background: var(--gold);
  color: #16110a;
}

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

/* ---------- legal pages ---------- */

.top-nav {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.top-nav a:hover { color: var(--text); }

.top-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.legal {
  max-width: 40rem;
  padding-block: clamp(34px, 6vh, 60px);
}

.legal h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.legal .updated {
  margin: 0 0 clamp(26px, 4vw, 38px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.legal h2 {
  margin: clamp(28px, 4vw, 38px) 0 12px;
  padding-top: clamp(16px, 2.4vw, 22px);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  letter-spacing: -0.012em;
}

.legal p,
.legal li {
  font-size: 1rem;
  line-height: 1.68;
  color: #d9d1c1;
}

.legal p { margin: 0 0 13px; }

.legal .lede {
  margin-bottom: clamp(30px, 4vw, 42px);
  font-size: 1.0625rem;
  color: #eae3d4;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.legal li { margin-bottom: 8px; }

.legal li::marker { color: var(--gold); }

.legal code {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.legal a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 199, 44, 0.35);
}

.legal a:hover { border-bottom-color: var(--gold); }

.legal strong { color: var(--text); font-weight: 600; }

.legal abbr {
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

/* ---------- 404 ---------- */

.back { margin: clamp(26px, 4vw, 36px) 0 0; }

.back a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--text);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--gold);
  transition: color 0.15s ease;
}

.back a:hover { color: var(--gold); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* A phone held sideways is short: keep the hero from pushing the footer off. */
@media (max-height: 520px) and (min-width: 620px) {
  main { justify-content: flex-start; padding-block: 32px; }
  .headline { margin-bottom: 24px; }
}
