/* Pearl Street Capital — direction 1a: editorial serif, no accent, hairline rules */

:root {
  --paper: #f7f6f3;
  --ink: #1c1b19;
  --body: #43413c;
  --meta: #6b6862;

  --gutter: clamp(24px, 7vw, 96px);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* ---------- layout ---------- */

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(36px, 6vh, 72px) var(--gutter) clamp(40px, 6vh, 88px);
}

/* Header and footer carry the full-ink hairlines; both are drawn on load. */
.masthead,
.colophon {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-shrink: 0;
}

.masthead::after,
.colophon::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  animation: draw 1000ms var(--ease) var(--delay, 0ms) both;
}

.masthead {
  padding-bottom: 18px;
}

.masthead::after { bottom: 0; }

.colophon {
  padding-top: 18px;
  --delay: 360ms;
}

.colophon::before { top: 0; }

.brand {
  font-size: clamp(17px, 2vw, 19px);
  letter-spacing: 0.01em;
}

.meta {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--meta);
}

.colophon a {
  font-size: clamp(16px, 1.9vw, 17px);
}

/* The statement takes the slack, so the page reads the same on any viewport. */
.statement {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(22px, 3.4vw, 32px);
  padding: clamp(64px, 12vh, 128px) 0;
  max-width: 800px;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 7.2vw, 68px);
  line-height: 1.06;
  font-weight: 300;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.lede {
  margin: 0;
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.6;
  color: var(--body);
  max-width: 620px;
  text-wrap: pretty;
}

/* ---------- narrow viewports ---------- */

@media (max-width: 480px) {
  .masthead,
  .colophon {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ---------- entrance ---------- */

.rise {
  animation: rise 900ms var(--ease) var(--delay, 0ms) both;
}

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

@keyframes draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .rise,
  .masthead::after,
  .colophon::before {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
