/* ==========================================================================
   Founder Ventures
   Plain HTML and CSS. No build step, no dependencies, no JavaScript.

   Palette and hairlines follow emilkowal.ski.
   Editorial serif and near-black ink follow foundersfund.com.
   ========================================================================== */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --bg:      #f8f8f8;
  --ink:     #202223;
  --muted:   #6f7071;
  --stroke:  #d6d6d6;
  --accent:  #f7474b;

  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype',
           Palatino, Georgia, 'Times New Roman', serif;
  --sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
           Arial, sans-serif;

  /* Horizontal page margin. Grows with the viewport, then stops. */
  --gutter: clamp(1.5rem, 6vw, 7rem);

  /* Vertical rhythm. One unit, everything else is a multiple. */
  --step: clamp(1.75rem, 4vh, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #252525;
    --ink:    #f0f0ef;
    --muted:  #989898;
    --stroke: #454545;
    --accent: #ff6b6e;
  }
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, p { margin: 0; }

/* --------------------------------------------------------------------------
   Page frame
   Full viewport height, masthead pinned top, footer pinned bottom,
   content sitting between them.
   -------------------------------------------------------------------------- */

.frame {
  min-height: 100svh;
  padding: var(--step) var(--gutter);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: calc(var(--step) * 1.5);
  max-width: 90rem;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Masthead and footer — small, wide-tracked, hairline rule
   -------------------------------------------------------------------------- */

.masthead,
.footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead {
  border-bottom: 1px solid var(--stroke);
  padding-bottom: calc(var(--step) * 0.6);
}

.footer {
  border-top: 1px solid var(--stroke);
  padding-top: calc(var(--step) * 0.6);
}

.masthead .mark { color: var(--ink); }

/* --------------------------------------------------------------------------
   Main column
   -------------------------------------------------------------------------- */

main {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: var(--step);
  padding-block: var(--step);
}

/* --------------------------------------------------------------------------
   Display headline
   Fluid from phone to desktop. Tight leading, because at this size the
   default line height opens the lines up far too much.
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 16ch;

  /* Optical alignment: the serif's left side bearing makes the B look
     indented against the hairline above it. Pull it back. */
  margin-left: -0.035em;
}

.display em {
  font-style: italic;
  /* The italic reads slightly smaller at the same point size. */
  font-size: 1.02em;
}

/* --------------------------------------------------------------------------
   Lede paragraph
   -------------------------------------------------------------------------- */

.lede {
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* The serif italic inside sans prose — the detail borrowed from
   emilkowal.ski. Used once, on one word. */
.lede em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.14em;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--stroke);
  transition: text-decoration-color 150ms ease;
}

a:hover { text-decoration-color: var(--accent); }

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

/* --------------------------------------------------------------------------
   Entrance
   Three elements, staggered. Pure CSS, runs once on load.
   -------------------------------------------------------------------------- */

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

.masthead,
.display,
.lede,
.footer {
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}

.masthead { animation-delay:  40ms; }
.display  { animation-delay: 120ms; }
.lede     { animation-delay: 240ms; }
.footer   { animation-delay: 340ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  :root { --bg: #fff; --ink: #000; --muted: #444; --stroke: #ccc; }
}
