/*
  Tailjay — About / Story page
  Design handoff: design_handoff_tailjay_story_2026-09-09
  Warm paper / ink / muted palette. No accent colour, no radius, no shadow —
  the entire visual vocabulary is 1px hairlines. See the handoff README
  before changing layout values; copy is final and must not be edited here.
*/

:root {
  --story-paper: #FBF9F5;
  --story-ink: #16130F;
  --story-body: #3B342B;
  --story-muted: #5C5449;
  --story-rule-10: rgba(22, 19, 15, 0.1);
  --story-rule-15: rgba(22, 19, 15, 0.15);
  --story-rule-20: rgba(22, 19, 15, 0.2);
  --story-rule-30: rgba(22, 19, 15, 0.3);
  --story-rule-35: rgba(22, 19, 15, 0.35);
  --story-shell: 52rem;
  --story-measure: 34rem;
}

.story-page {
  background: var(--story-paper);
  color: var(--story-ink);
  font-family: Archivo, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.story-page * {
  box-sizing: border-box;
}

.story-page a {
  color: var(--story-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--story-rule-35);
}

.story-page a:hover {
  color: var(--story-ink);
  border-color: var(--story-ink);
}

/* Scroll progress bar — CSS scroll-driven animation, no JS */
.story-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 50;
  pointer-events: none;
}

.story-progress-bar {
  height: 100%;
  background: var(--story-ink);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

@keyframes story-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@supports (animation-timeline: scroll()) {
  .story-progress-bar {
    animation: story-grow linear both;
    animation-timeline: scroll(root block);
  }
}

/* Sticky header */
.story-header-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--story-rule-10);
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: var(--story-shell);
  margin: 0 auto;
  padding: 0.9rem clamp(1.25rem, 4vw, 2rem);
}

.story-page .story-wordmark {
  display: block;
  border: 0;
}

.story-wordmark img {
  height: 20px;
  width: auto;
  display: block;
}

.story-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.5rem);
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .story-nav {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .story-nav::-webkit-scrollbar { display: none; }
  .story-nav a { white-space: nowrap; }
}

.story-page .story-nav-link {
  position: relative;
  color: var(--story-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.story-nav-link::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  top: -9px;
  bottom: -9px;
}

.story-page .story-nav-link:hover {
  color: var(--story-ink);
  border-bottom-color: var(--story-rule-30);
}

.story-page .story-nav-link[data-active] {
  color: var(--story-ink);
  border-bottom-color: var(--story-ink);
}

/* Shell / content measures */
.story-shell {
  max-width: var(--story-shell);
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 2rem);
  padding-right: clamp(1.25rem, 4vw, 2rem);
}

.story-measure {
  max-width: var(--story-measure);
}

/* Hero */
.story-hero {
  padding-top: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.story-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--story-muted);
  margin: 0 0 1rem;
}

.story-h1 {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  max-width: 26ch;
  text-wrap: balance;
}

.story-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.story-page .story-logo-link {
  display: block;
  border: 0;
  opacity: 0.72;
  transition: opacity 0.25s ease;
}

.story-page .story-logo-link:hover,
.story-page .story-logo-link:focus-visible {
  opacity: 1;
}

.story-logo-link img {
  width: auto;
  display: block;
}

@media (max-width: 560px) {
  .story-logo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: start;
    align-items: center;
    gap: 1.5rem 1.25rem;
  }
}

.story-logo-upsolut img { height: 20px; }
.story-logo-deelab img { height: 32px; }
.story-logo-academy img { height: 30px; }
.story-logo-gigs img { height: 24px; }

/* Figures band */
.story-figures-section {
  padding-top: 0;
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.story-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(50%, 8rem), 1fr));
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--story-rule-20);
  border-bottom: 1px solid var(--story-rule-20);
}

.story-figure-num {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.story-figure-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--story-muted);
  margin: 0;
}

.story-figures-footnote {
  font-size: 0.8125rem;
  color: var(--story-muted);
  margin: 0.85rem 0 0;
  text-wrap: pretty;
}

/* Body copy */
.story-main {
  padding-top: 0;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.story-intro {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--story-ink);
  margin: 0 0 1.75rem;
  max-width: 46ch;
  text-wrap: pretty;
}

.story-p {
  margin: 0 0 1.25rem;
  color: var(--story-body);
  text-wrap: pretty;
}

.story-p-last {
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  color: var(--story-body);
  text-wrap: pretty;
}

.story-p-final {
  margin-bottom: 0;
}

.story-pipeline-note {
  font-size: 0.9375rem;
  color: var(--story-muted);
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  text-wrap: pretty;
}

.story-h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
  scroll-margin-top: 5rem;
}

/* Timeline */
.story-timeline {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.story-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding: 0.6rem 0;
  font-size: 0.9375rem;
}

.story-row + .story-row {
  border-top: 1px solid var(--story-rule-10);
}

.story-row-date {
  color: var(--story-muted);
}

@keyframes story-row-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  .story-row {
    animation: story-row-in linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 20%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-row { animation: none; opacity: 1; transform: none; }
  .story-progress-bar { animation: none; }
}

/* Founder section */
.story-founder {
  border-top: 1px solid var(--story-rule-20);
  padding-top: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.story-founder-photo {
  margin: 0 0 1.5rem;
}

.story-founder-photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--story-rule-15);
}

.story-signature {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--story-muted);
  margin: 0;
}

/* Footer */
.story-footer {
  border-top: 1px solid var(--story-rule-15);
}

.story-footer-grid {
  max-width: var(--story-shell);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 2rem 2.5rem;
  font-size: 0.9375rem;
}

.story-footer-head {
  font-weight: 500;
  margin: 0 0 0.75rem;
  color: var(--story-ink);
}

.story-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.story-page .story-footer-link {
  border: 0;
  color: var(--story-muted);
}

.story-page .story-footer-link:hover,
.story-page .story-footer-link:focus-visible {
  color: var(--story-ink);
}

.story-footer-bottom {
  border-top: 1px solid var(--story-rule-15);
}

.story-footer-bottom-inner {
  max-width: var(--story-shell);
  margin: 0 auto;
  padding: 1.25rem clamp(1.25rem, 4vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--story-muted);
}

.story-footer-bottom-inner p {
  margin: 0;
}

/* Venture article rail (right column, desktop) */
.story-rail {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.story-rail-title {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--story-muted);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--story-rule-20);
}

.story-rail-group {
  margin-bottom: 1.75rem;
}

.story-rail-group:last-child {
  margin-bottom: 0;
}

.story-rail-source {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--story-ink);
  margin: 0 0 0.5rem;
}

.story-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-rail-list li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--story-rule-10);
}

.story-rail-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.story-page .story-rail-list a {
  display: block;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--story-body);
  border-bottom: 0;
  transition: color 0.2s ease;
}

.story-page .story-rail-list a:hover,
.story-page .story-rail-list a:focus-visible {
  color: var(--story-ink);
}

.story-rail-date {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--story-muted);
}

/* Two-column only when there is genuinely room for it. Below this the rail
   stays in the flow and reads as a normal block above the footer. */
@media (min-width: 1200px) {
  :root {
    --story-shell: 61rem;
  }

  .story-main-grid {
    display: grid;
    grid-template-columns: var(--story-measure) minmax(0, 1fr);
    gap: clamp(3rem, 5vw, 4.5rem);
    align-items: start;
  }

  .story-rail {
    margin-top: 0;
    position: sticky;
    top: 5.75rem;
  }
}
