/* ==========================================================================
   LP Capital
   Design tokens, base styles, layout, components, responsive overrides.
   ========================================================================== */

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

:root {
  /* Color */
  --color-surface: #fbfbfa;
  --color-ink: #1b221f;
  --color-ink-soft: #2b332f;
  --color-ink-muted: #4f5853;
  --color-rule: #dcdfdb;
  --color-focus: #2f4a3e;

  /* Type */
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --text-xs: 13px;
  --text-sm: 15px;
  --text-base: 16px;
  --text-label: 17px;
  --text-body: 18px;
  --text-heading: 21px;
  --text-lede: 31px;

  /* Layout */
  --measure: 1180px;
  --gutter: 56px;
  --column-gap: 48px;
  --tap-target: 44px;

  /* Section rhythm. Overridden per section where needed. */
  --section-top: 112px;
  --section-bottom: 104px;
  --label-offset: 3px;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--color-ink);
  text-decoration: none;
}

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

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

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-surface);
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  box-sizing: border-box;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-main {
  min-height: 72vh;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding-top: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--color-rule);
}

.wordmark {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: var(--tap-target);
  color: var(--color-ink);
}

.site-nav {
  display: flex;
  flex-direction: row;
  gap: 40px;
  font-size: var(--text-base);
}

.nav-link {
  line-height: var(--tap-target);
  color: var(--color-ink-muted);
}

.nav-link[aria-current="page"] {
  color: var(--color-ink);
}

/* --------------------------------------------------------------------------
   Pages
   Each section is a routed "page". Visibility is driven by .is-current, which
   site.js toggles from the URL hash. The .js gate keeps every section visible
   when scripting is unavailable.
   -------------------------------------------------------------------------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr);
  gap: var(--column-gap);
  padding-top: var(--section-top);
  padding-bottom: var(--section-bottom);
}

.js .page {
  display: none;
}

.js .page.is-current {
  display: grid;
}

.page-label {
  margin: 0;
  font-size: var(--text-label);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-ink-muted);
  padding-top: var(--label-offset);
}

.page-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 620px;
}

.page-body p {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

#about {
  --label-offset: 8px;
}

#about .page-body {
  gap: 28px;
  max-width: 700px;
}

#about .page-body p {
  max-width: 620px;
}

.lede {
  font-size: var(--text-lede);
  line-height: 1.36;
  letter-spacing: -0.01em;
  font-weight: 400;
}

/* Optical spacing between the lede and the paragraphs that follow it. */
.lede + p {
  margin-top: 12px;
}

.people {
  display: flex;
  flex-direction: column;
  margin-top: 36px;
  max-width: 620px;
  border-top: 1px solid var(--color-rule);
}

.person {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-rule);
  font-size: var(--text-body);
  line-height: 1.5;
}

.person-name {
  font-weight: 600;
}

.person-role {
  color: var(--color-ink-muted);
}

/* --------------------------------------------------------------------------
   Sector focus
   -------------------------------------------------------------------------- */

#sectors {
  --label-offset: 2px;
  --section-bottom: 120px;
}

.sectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
  row-gap: 64px;
}

.sector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sector h3 {
  margin: 0;
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 1.35;
}

.sector p {
  margin: 0;
  font-size: var(--text-label);
  line-height: 1.7;
  color: var(--color-ink-soft);
}

/* --------------------------------------------------------------------------
   Careers
   -------------------------------------------------------------------------- */

#careers {
  --label-offset: 2px;
  --section-bottom: 120px;
}

.careers-body {
  gap: 0;
  max-width: 700px;
}

.jobs {
  display: flex;
  flex-direction: column;
}

/* Each opening. The border-top plus a border-bottom on the last child draws
   one rule between listings without doubling up where two jobs meet. */
.job {
  border-top: 1px solid var(--color-rule);
  padding-top: 24px;
  padding-bottom: 24px;
}

.job:last-child {
  border-bottom: 1px solid var(--color-rule);
}

/* The click target. Native <details> markers are removed in favor of the
   +/- indicator below so it matches the site's type instead of the
   browser's default triangle. */
.job-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  cursor: pointer;
  list-style: none;
}

.job-summary::-webkit-details-marker {
  display: none;
}

.job-summary:hover .job-title {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.job-summary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.job-title {
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 1.35;
}

.job-location {
  font-size: var(--text-base);
  color: var(--color-ink-muted);
}

/* Open/closed indicator. A plain +/- rather than an icon, to stay in the
   same serif type as the rest of the page. */
.job-summary::after {
  content: "+";
  margin-left: auto;
  padding-left: 24px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-ink-muted);
}

.job[open] .job-summary::after {
  content: "\2212";
}

.job-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
  max-width: 620px;
}

.job-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.job-meta dt {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.job-meta dd {
  margin: 4px 0 0 0;
  font-size: var(--text-base);
  line-height: 1.5;
}

.job-heading {
  margin: 4px 0 0 0;
  font-size: var(--text-base);
  font-weight: 600;
}

.job-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--text-label);
  line-height: 1.7;
  color: var(--color-ink-soft);
}

.job-note {
  margin: 4px 0 0 0;
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}

.job-apply {
  margin: 0;
  font-size: var(--text-body);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer-inner {
  padding-top: 36px;
  padding-bottom: 56px;
  border-top: 1px solid var(--color-rule);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-ink-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
  :root {
    --gutter: 24px;
    --section-top: 56px;
    --section-bottom: 56px;
    --column-gap: 24px;
    --text-lede: 23px;
  }

  #sectors {
    --section-bottom: 56px;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .site-nav {
    gap: 20px;
    flex-wrap: wrap;
  }

  .page {
    grid-template-columns: minmax(0, 1fr);
  }

  .sectors {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 40px;
    row-gap: 40px;
  }

  .job-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .person {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
