/* ============================================================
   Pipepoint — site.css
   Dark-first, typography-led. Structure + styling (no animation yet).
   ============================================================ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') 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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/jetbrainsmono-latin.woff2') 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;
}

/* ---------- tokens ---------- */
:root {
  --bg:          #0A0A0A;
  --bg-raised:   #0E0E0E;
  --bg-inset:    #101010;
  --text:        #EAE8E4;
  --text-dim:    #A2A09A;
  --text-faint:  #8A8884; /* 5.3:1 on --bg — keeps small mono labels AA-compliant */
  --line:        rgba(234, 232, 228, 0.10);
  --line-strong: rgba(234, 232, 228, 0.18);
  --accent:      #3DE08F;
  --accent-dim:  rgba(61, 224, 143, 0.14);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --rule: 1px solid var(--line);
  --radius: 4px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: 'ss01' 1, 'cv05' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }

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

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

::selection { background: var(--accent); color: #0A0A0A; }

/* ---------- utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- type scale ---------- */
.display {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
  max-width: 14ch;
}
@media (max-width: 939px) {
  .display { max-width: 18ch; }
}

.h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 600;
  text-wrap: balance;
}

.h3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
}

.lede {
  margin-top: 1.5rem;
  max-width: 34em;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.55;
  color: var(--text-dim);
  text-wrap: pretty;
}

.fig,
.eyebrow,
.card__index,
.feed__tag,
.feed__status,
.feed__source,
.section__kicker,
.sample__cap,
.chips li {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 400;
}

.fig { color: var(--text-faint); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.eyebrow__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

/* ---------- buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  background: var(--text);
  color: #0A0A0A;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius);
  transition: background 140ms ease, color 140ms ease;
}
.btn:hover { background: var(--accent); }
.btn--sm { padding: 0.5rem 0.9rem; font-size: 0.875rem; }

.link-quiet {
  font-size: 0.9375rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 140ms ease, border-color 140ms ease;
}
.link-quiet:hover { color: var(--text); border-color: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  transition: opacity 140ms ease;
}
.wordmark:hover { opacity: 0.78; }

/* Sized by height, so a re-export at any resolution drops straight in. */
.wordmark img {
  height: 24px;
  width: auto;
}

.site-nav__list {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--text-dim);
  transition: color 140ms ease;
}
.site-nav a:hover { color: var(--text); }

@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 8vw, 6.5rem);
  border-bottom: var(--rule);
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: start;
}

@media (min-width: 940px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: clamp(3rem, 5vw, 5rem);
  }
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* ---------- signal feed ---------- */
.feed {
  background: var(--bg-raised);
  border: var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: var(--rule);
  background: rgba(234, 232, 228, 0.015);
}

.feed__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
}
.feed__pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.feed__body { padding: 1.15rem 1.15rem 0.35rem; }

.feed__source {
  color: var(--text-faint);
  padding-bottom: 1rem;
  border-bottom: var(--rule);
  letter-spacing: 0.08em;
}

.feed__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'tag   score'
    'firm  score'
    'event event';
  column-gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: var(--rule);
}
.feed__list > .feed__row:last-child { border-bottom: 0; }

.feed__tag {
  grid-area: tag;
  color: var(--accent);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
}

.feed__firm {
  grid-area: firm;
  margin-top: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.feed__event {
  grid-area: event;
  margin-top: 0.2rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.feed__score {
  grid-area: score;
  align-self: center;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.feed__note {
  padding: 0.9rem 1.15rem;
  border-top: var(--rule);
  font-size: 0.75rem;
  color: var(--text-faint);
  background: rgba(234, 232, 228, 0.015);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  border-bottom: var(--rule);
}

.section__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 880px) {
  .section__grid {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
  }
}

.section__label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.section__kicker { color: var(--text); }

.section__head {
  max-width: 42em;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section__head .fig { margin-bottom: 1.25rem; }

.section__intro {
  margin-top: 1.25rem;
  max-width: 40em;
  color: var(--text-dim);
  font-size: 1.0625rem;
}

.section__body { max-width: 46em; }

.prose p {
  margin-top: 1.5rem;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.65;
  text-wrap: pretty;
}
.prose__pull {
  color: var(--text) !important;
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin-top: 2rem !important;
}

/* ---------- bento ---------- */
.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
}

.card {
  grid-column: span 12;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--bg-raised);
  border: var(--rule);
  border-radius: 6px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.card:hover {
  border-color: var(--line-strong);
  background: var(--bg-inset);
}

.card__index {
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.card p:not(.card__index) {
  margin-top: 0.85rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 44ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.75rem;
}
.chips li {
  padding: 0.3rem 0.6rem;
  border: var(--rule);
  border-radius: 999px;
  color: var(--text-faint);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

@media (min-width: 880px) {
  .card--a { grid-column: span 7; }
  .card--b { grid-column: span 5; }
  .card--c {
    grid-column: span 12;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }
}

.sample {
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.sample__cap {
  padding: 0.65rem 1rem;
  border-bottom: var(--rule);
  color: var(--text-faint);
}
.sample__body { padding: 1.15rem 1rem 1.35rem; }
.card .sample__body p {
  margin-top: 0.85rem;
  color: var(--text-dim);
  font-size: 0.875rem;
  line-height: 1.6;
}
.sample__subject {
  margin-top: 0 !important;
  color: var(--text) !important;
  font-weight: 500;
}

/* ---------- who it's for ---------- */
.fit-list {
  display: grid;
  gap: 1px;
  margin-top: 2.75rem;
  background: var(--line);
  border: var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
@media (min-width: 620px) {
  .fit-list { grid-template-columns: 1fr 1fr; }
}

.fit {
  padding: 1.5rem;
  background: var(--bg);
  transition: background 160ms ease;
}
.fit:hover { background: var(--bg-inset); }
.fit p {
  margin-top: 0.5rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.notfit {
  margin-top: 2.5rem;
  padding-left: 1.25rem;
  border-left: var(--rule);
  border-left-width: 2px;
}
.notfit__title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-faint);
}
.notfit p {
  margin-top: 0.6rem;
  max-width: 52ch;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

/* ---------- contact ---------- */
.section--contact { border-bottom: 0; }

.contact { max-width: 46em; }
.contact__title { margin-top: 1.25rem; }
.contact__body {
  margin-top: 1.5rem;
  max-width: 38em;
  color: var(--text-dim);
  font-size: 1.0625rem;
}

.contact__email {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.15em;
  transition: color 160ms ease, border-color 160ms ease;
}
.contact__email:hover { color: var(--accent); border-color: var(--accent); }

.contact__sign {
  margin-top: 2rem;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

/* ============================================================
   LEGAL / LONG-FORM PAGE
   ============================================================ */
.legal {
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.legal .shell { max-width: 780px; }

.legal__head {
  padding-bottom: 2.5rem;
  border-bottom: var(--rule);
}
.legal__title { margin-top: 1.25rem; }

.legal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 2rem 0 0;
}
.legal__meta dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.legal__meta dd {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
}
.legal__meta a { border-bottom: 1px solid var(--line-strong); }
.legal__meta a:hover { color: var(--text); }

.legal__body {
  padding-top: 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dim);
  text-wrap: pretty;
}

.legal__body h2 {
  margin-top: 3rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.legal__body h3 {
  margin-top: 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.legal__body p,
.legal__body ul,
.legal__body ol { margin-top: 1rem; }

.legal__body ul,
.legal__body ol {
  padding-left: 1.25rem;
  list-style: disc;
}
.legal__body ol { list-style: decimal; }
.legal__body li { margin-top: 0.5rem; }
.legal__body li::marker { color: var(--text-faint); }

.legal__body a {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
}
.legal__body a:hover { border-color: var(--accent); }

.legal__body strong {
  color: var(--text);
  font-weight: 500;
}

/* Wide tables scroll inside their own box rather than the page. */
.legal__table {
  margin-top: 1.5rem;
  overflow-x: auto;
}
.legal__body table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.legal__body th,
.legal__body td {
  padding: 0.75rem 1.5rem 0.75rem 0;
  text-align: left;
  border-bottom: var(--rule);
  vertical-align: top;
}
.legal__body thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 400;
  padding-bottom: 0.6rem;
}
.legal__body tbody th {
  color: var(--text);
  font-weight: 500;
  width: 38%;
}

.legal__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.5rem;
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.legal__contacts dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.legal__contacts dd { margin: 0.5rem 0 0; }

.legal__address {
  margin-top: 1rem;
  font-style: normal;
  line-height: 1.9;
}

.legal__back {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: var(--rule);
}

/* ============================================================
   404
   ============================================================ */
.notfound {
  display: flex;
  align-items: center;
  min-height: min(70vh, 34rem);
  padding-block: clamp(4rem, 10vw, 7rem);
}
.notfound .shell { max-width: 46em; }
.notfound__title { margin-top: 1.25rem; }
.notfound__body {
  margin-top: 1.5rem;
  max-width: 38em;
  color: var(--text-dim);
  font-size: 1.0625rem;
}
.notfound__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: var(--rule);
  padding-block: 2.5rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.site-footer__name {
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-right: auto;
}
.site-footer__links {
  display: flex;
  gap: 1.5rem;
}
.site-footer__links a {
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}
.site-footer__links a:hover { color: var(--text); border-color: var(--line-strong); }
.site-footer__legal { color: var(--text-faint); }

@media (max-width: 620px) {
  .site-footer__name { width: 100%; margin-right: 0; }
}

/* ============================================================
   MOTION
   ============================================================ */

/* ---------- scroll reveals ---------- */
/* Hidden state only applies when JS is running, so no-JS keeps everything
   visible and nothing above the fold is ever withheld. */
.js .reveal {
  opacity: 0;
  transform: translateY(8px);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 420ms ease, transform 420ms cubic-bezier(0.22, 0.68, 0.3, 1);
}

/* ---------- signal feed ---------- */
.feed__pulse { position: relative; }
.feed.is-live .feed__pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: pp-pulse 2600ms ease-out infinite;
}

@keyframes pp-pulse {
  0%        { opacity: 0.55; transform: scale(0.7); }
  70%, 100% { opacity: 0;    transform: scale(2.1); }
}

.feed.is-live .feed__row {
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
}
.feed.is-live .feed__row.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 380ms ease, transform 380ms cubic-bezier(0.22, 0.68, 0.3, 1);
}
.feed.is-live .feed__row.is-leaving {
  opacity: 0;
  padding-block: 0;
  transition: height 320ms cubic-bezier(0.4, 0, 0.2, 1),
              padding 320ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms ease;
}

/* Caret sits on whichever line is currently being typed. */
.feed__row.is-typing-firm .feed__firm::after,
.feed__row.is-typing-event .feed__event::after {
  content: '';
  display: inline-block;
  width: 0.5em;
  height: 0.95em;
  margin-left: 0.12em;
  background: var(--accent);
  vertical-align: -0.12em;
  animation: pp-caret 1000ms steps(1) infinite;
}

@keyframes pp-caret {
  0%, 50%   { opacity: 0.8; }
  51%, 100% { opacity: 0; }
}

/* ---------- opt out ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .feed.is-live .feed__row { opacity: 1; transform: none; }
  .feed.is-live .feed__pulse::after { display: none; }
  .feed__row.is-typing-firm .feed__firm::after,
  .feed__row.is-typing-event .feed__event::after { display: none; }
}
