/* ============================================================
   JW Venture Investments — tattoo flash sheet meets terminal
   Palette: bone paper, black ink, oxblood, indigo.
   No external requests. Newsreader is self-hosted; mono is a system stack.
   ============================================================ */

/* Newsreader (OFL), optical size plus weight. Display sizes sharpen the
   titles; text sizes stay readable in the paragraphs. License: fonts/OFL.txt */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-roman.woff2?v=6e4f2958") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-italic.woff2?v=5dfcd10d") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bone: #f3eee1;
  --bone-deep: #e8e1cd;
  --ink: #16130d;
  --ink-soft: #4d4738;
  --oxblood: #7c2121;
  --indigo: #2f3a66;
  --serif: "Newsreader", Georgia, "Times New Roman", "Nimbus Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --head-h: 3.75rem;
  /* Footer panorama. On wide screens it spans the page; on phones the
     height stays at the size of a wider plate and the sides crop. */
  --range-h: calc(100vw * 387 / 2688);
  --range-w: 64rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* faint paper tooth */
  background-image: radial-gradient(rgba(22,19,13,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

::selection { background: var(--oxblood); color: var(--bone); }

/* ---------- accessibility ---------- */
.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  background: var(--ink); color: var(--bone);
  padding: 0.6rem 1rem; border-radius: 4px;
  font-family: var(--mono); font-size: 0.85rem;
  text-decoration: none; z-index: 200;
  transition: top 0.15s ease;
}
.skip:focus { top: 0.75rem; }

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

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

/* ---------- the mark ----------
   The company's own monogram, cut from the JW Venture logo and baked once as
   an ink-coloured transparent PNG (jw-mark.png, 2x). A plain <img>, not a CSS
   mask: Chrome fetches mask images with CORS, which fails when the page is
   opened from disk, and this page is meant to work from file:// too. */
.mark { display: inline-block; width: auto; vertical-align: middle; }
.mark-sm { height: 1.35rem; }
.mark-md { height: 3rem; }
.mark-lg { height: clamp(8.5rem, 28vw, 15rem); }

/* ---------- header ----------
   Two rows until the wordmark, the section links, and Login fit on one.
   The header itself is the container, so the switch follows the bar, not a
   guessed viewport. */
.site-head {
  position: sticky; top: 0; z-index: 100;
  container-type: inline-size;
  background: rgba(243,238,225,0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(22,19,13,0.25);
  padding-top: env(safe-area-inset-top, 0px);
}
.head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand sign"
    "nav nav";
  align-items: center;
  column-gap: 1.25rem;
  row-gap: 0.15rem;
  padding-top: 0.35rem;
  padding-bottom: 0.15rem;
  padding-left: max(clamp(1.15rem, 3vw, 2.25rem), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(1.15rem, 3vw, 2.25rem), env(safe-area-inset-right, 0px));
}

.wordmark {
  grid-area: brand;
  display: inline-flex; align-items: center; gap: 0.7rem;
  min-width: 0;
  min-height: 2.75rem;
  margin: 0;
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}
/* Trailing tracking is not part of the word. Pull it back so the gap
   after the name is the gap we set. */
.wordmark-text { margin-right: -0.16em; }

.site-head nav { grid-area: nav; min-width: 0; }
.site-head nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.9rem, 2.6vw, 1.85rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.15rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-head nav a:hover {
  color: var(--oxblood);
  text-decoration: none;
  border-bottom-color: transparent;
}
.site-head nav a[aria-current="true"] {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood);
}
.signin {
  grid-area: sign;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--oxblood);
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  text-decoration: none;
  white-space: nowrap;
}
.signin:hover { background: var(--oxblood); color: var(--bone); }

/* Links stay on one line so one of them is not left alone on a second row. */
@container (max-width: 23.99rem) {
  .site-head nav ul { flex-wrap: nowrap; gap: 0.35rem; }
  .site-head nav a { letter-spacing: 0.06em; font-size: 0.72rem; padding-inline: 0.2rem; }
  .signin { letter-spacing: 0.08em; font-size: 0.68rem; padding: 0 0.55rem; }
}
@container (max-width: 40rem) {
  .wordmark { font-size: 0.84rem; letter-spacing: 0.1em; }
  .wordmark-text { margin-right: -0.1em; }
}
@container (max-width: 22rem) {
  .wordmark { font-size: 0.74rem; letter-spacing: 0.01em; }
  .wordmark-text { margin-right: -0.01em; }
  .site-head nav ul { gap: 0.5rem; }
}

/* One row once the name, the links, and Login can share a line with
   equal space on either side of the links. */
@container (min-width: 50rem) {
  .head-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav sign";
    column-gap: 1.75rem;
    padding-block: 0.15rem;
  }
  .site-head nav ul {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1.75rem;
  }
}

/* ---------- layout helpers ---------- */
.wrap {
  width: min(68ch, calc(100vw - 2 * max(1rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))));
  margin-inline: auto;
}
.wide { width: min(1100px, 94vw); margin-inline: auto; }
.center { text-align: center; }

main > section,
.moran > section { padding: clamp(3.5rem, 9vw, 7rem) 0; }

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 0.75rem;
}
/* Section numbers follow the sections on the page. */
main { counter-reset: sec; }
.numbered { counter-increment: sec; }
.numbered > .kicker::before,
.numbered > .wrap > .kicker::before { content: "No. " counter(sec, decimal-leading-zero); }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}

.lede { font-size: 1.125rem; color: var(--ink-soft); max-width: 58ch; }
.lede strong { color: var(--ink); font-weight: 600; }

.investing-part h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
.investing-part p {
  margin: 0 0 1rem;
  max-width: 62ch;
  color: var(--ink-soft);
}
.investing-part p:last-child { margin-bottom: 0; }
#investing > .wrap + .wrap { margin-top: clamp(2.75rem, 6vw, 4.5rem); }

/* Short rule between sections. */
main > section + section,
.moran > section + section,
main > section + .moran,
main > .moran + section { position: relative; }
main > section + section::before,
.moran > section + section::before,
main > section + .moran::before,
main > .moran + section::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(7rem, 22vw);
  height: 1px;
  background: rgba(22,19,13,0.35);
}
/* Larger than the block, clipped at its edges. Shifted so the cloud band
   sits just below the rule between About and Investing. */
.moran {
  position: relative;
  overflow: hidden;
}
#investing::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 0;
  width: 130%;
  max-width: calc(1024px * 0.8);
  aspect-ratio: 1024 / 660;
  transform: translate(-55%, -40%);
  background: url("../images/mt-moran.jpg?v=e62d184d") center / contain no-repeat;
  filter: grayscale(1);
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}
@media (max-width: 48rem) {
  #investing::after { display: none; }
}

/* ---------- landing ---------- */
.landing {
  /* vh first, svh second: the fallback must lose, not win */
  min-height: calc(100vh - var(--head-h));
  min-height: calc(100svh - var(--head-h));
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* Gap between the nav and the Grand Teton summit. */
  --peak-gap: clamp(2.4rem, 6svh, 4rem);
  padding: 2rem max(1rem, env(safe-area-inset-right, 0px)) max(6.5rem, calc(4rem + env(safe-area-inset-bottom, 0px))) max(1rem, env(safe-area-inset-left, 0px));
}
/* Pencil plate of the Tetons. Multiply drops the paper white out.
   Height is 95% of the landing; width follows the file's aspect ratio.
   The summit is 21.3% down the file, shifted up to the gap under the nav. */
.landing::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: var(--peak-gap);
  width: auto;
  height: 95%;
  aspect-ratio: 2944 / 1648;
  transform: translate(-50%, -21.3%);
  background: url("../images/tetons-illustration.jpg?v=e9dd038a") center / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.2;
  pointer-events: none;
}
.landing-inner { position: relative; z-index: 1; }

.seal {
  display: block;
  color: var(--ink);
  margin: 0 0 1.75rem;
  line-height: 0;
  text-decoration: none;
}

.landing h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 3.1vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: 0.012em;
  color: var(--ink);
  margin: 0 auto;
}
.landing-place {
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  line-height: 1.3;
  letter-spacing: 0.015em;
  color: var(--ink-soft);
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: max(1.35rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-cue:hover,
.scroll-cue:focus-visible { color: var(--oxblood); }
.scroll-cue:focus-visible { outline: 1px solid var(--oxblood); outline-offset: 6px; }
.scroll-cue-track {
  position: relative;
  width: 1px;
  height: 2.6rem;
}
.scroll-cue-track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0.45;
}
.scroll-cue-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 5px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--oxblood);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue-dot { animation: cue-fall 1.8s ease-in-out infinite; }
}
@keyframes cue-fall {
  0% { transform: translateY(0); opacity: 0; }
  18% { opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translateY(2.15rem); opacity: 0; }
}
/* Landscape phones are short. Keep the place name and the cue on screen. */
@media (max-height: 32rem) {
  .mark-lg { height: clamp(4.75rem, 30vh, 8rem); }
  .seal { margin-bottom: 0.55rem; }
  .landing {
    --peak-gap: 0.85rem;
    padding-top: 0.85rem;
    padding-bottom: max(4.25rem, calc(3rem + env(safe-area-inset-bottom, 0px)));
  }
  .landing h1 { font-size: 1.4rem; }
  .scroll-cue {
    gap: 0.35rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
  }
  .scroll-cue-track { height: 1.45rem; }
}
@media (max-height: 32rem) and (prefers-reduced-motion: no-preference) {
  .scroll-cue-dot { animation-name: cue-fall-short; }
}
@keyframes cue-fall-short {
  0% { transform: translateY(0); opacity: 0; }
  18% { opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translateY(1.05rem); opacity: 0; }
}

/* ---------- founders ---------- */
.founders {
  display: grid; gap: 2.25rem 3rem;
  margin-top: 0.5rem;
}
@media (min-width: 48rem) {
  .founders { grid-template-columns: 1fr 1fr; }
}
.person { margin: 0; border-top: 2px solid var(--ink); padding-top: 1rem; }
.person-photo {
  display: block;
  width: 10rem;
  height: auto;
  margin: 0 0 0.75rem;
  opacity: 0.85;
}
.person p { margin: 0; }
.person-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}
.person-role {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--oxblood);
  margin: 0.35rem 0 0.75rem !important;
}
.person-line {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 34ch;
}

/* ---------- contact ---------- */
#contact address {
  font-family: inherit;
  font-style: normal;
  font-size: inherit;
  line-height: 1.65;
}
#contact address a {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--oxblood);
  text-underline-offset: 0.15em;
}
#contact address a:hover { color: var(--ink); }
/* Room for the range, which rises off the footer rule into this padding. */
#contact {
  padding-bottom: calc(var(--range-h) + clamp(2.75rem, 6vw, 4rem));
}
/* ---------- footer ---------- */
footer {
  position: relative;
  border-top: 1px solid rgba(22,19,13,0.25);
  padding: 2rem max(1rem, env(safe-area-inset-right, 0px)) max(3rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  text-align: center;
  font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
/* Panorama of the range, set on the footer's top rule. */
.footer-range {
  position: absolute;
  left: 0;
  width: 100%;
  bottom: calc(100% + 1px);
  aspect-ratio: 2688 / 387;
  pointer-events: none;
  background: url("../images/teton-range-footer.jpg?v=bc4c1129") center 38.46% / 104% auto no-repeat;
  mix-blend-mode: multiply;
  filter: grayscale(90%);
  opacity: 0.5;
}
/* Phones keep a larger plate, centered on the bottom, with the sides cut off. */
@media (max-width: 48rem) {
  :root { --range-h: calc(var(--range-w) * 387 / 2688); }
  .footer-range {
    overflow: hidden;
    height: var(--range-h);
    aspect-ratio: auto;
    background: none;
  }
  .footer-range::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: var(--range-w);
    height: 100%;
    transform: translateX(-50%);
    background: url("../images/teton-range-footer.jpg?v=bc4c1129") center 38.46% / 104% auto no-repeat;
  }
}
footer p { margin: 0.3rem 0; }
/* The line is wider than a phone. Stack the city instead of orphaning it. */
@media (max-width: 30rem) {
  .footer-sep { display: none; }
  .footer-place { display: block; }
}
footer .colophon { opacity: 0.75; }

/* ---------- scroll reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- wide screens ---------- */
@media (min-width: 75rem) {
  body { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .scroll-cue-dot { top: auto; bottom: 0; opacity: 1; }
}
