/* ---------- design tokens ---------- */
:root {
  --bg:        #FBFAF6;   /* warm near-white */
  --bg-muted:  #F4F2EC;   /* subtle alt stripe */
  --ink:       #0B0B0B;
  --ink-soft:  #1f1f1f;
  --ink-mute:  #7a7468;
  --line:      #0B0B0B;   /* hairlines — thin black */
  --line-soft: #d6d1c3;
  --hi:        #B23A2E;   /* rare editorial red — used sparingly */

  --serif: 'Instrument Serif', 'Times New Roman', Times, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono:  'JetBrains Mono', 'Courier New', Courier, monospace;

  --w-max: 1280px;
  --pad-x: clamp(20px, 5vw, 72px);

  --t: 220ms cubic-bezier(.2,.6,.2,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: opacity var(--t); }
a:hover { opacity: .55; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
dl { display: grid; gap: 4px 12px; }
em { font-style: italic; }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg); padding: 8px 12px;
  z-index: 1000;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
}
.skip-link:focus { left: 16px; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

/* ---------- mono utility (used on all meta/labels/nav) ---------- */
.nav-links a,
.logo-mark,
.eyebrow,
.section-kicker,
.video-meta .tag,
.test-label,
.btn-primary,
.btn-ghost,
.services li,
.footer-links a,
.footer-copy {
  font-family: var(--mono);
  letter-spacing: .04em;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.nav.scrolled { border-bottom-color: var(--ink); }
.nav-inner {
  max-width: none;
  padding: 18px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
}
.logo-mark {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-links {
  display: flex; gap: 36px;
  font-size: 11px; letter-spacing: .14em;
  font-weight: 500;
}
.nav-links a { padding: 4px 0; position: relative; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--ink);
  transition: right var(--t);
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { right: 0; }

.nav-toggle { display: none; width: 32px; height: 32px; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform var(--t), opacity var(--t); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  padding: clamp(48px, 10vh, 120px) var(--pad-x) clamp(60px, 12vh, 140px);
  max-width: var(--w-max); margin: 0 auto;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero-photo {
  aspect-ratio: 4/5;
  background: var(--bg-muted);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--ink);
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(20%) contrast(1.02);
}
.hero-photo img.placeholder,
.hero-photo:not(:has(img[src])) { background: linear-gradient(180deg, #e3dfd2, #b5ae9d); }

.eyebrow {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 8.2vw, 112px);
  line-height: .94;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.hero h1 em { font-style: italic; }
.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 0;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background var(--t), color var(--t);
}
.btn-primary:hover { background: var(--bg); color: var(--ink); opacity: 1; box-shadow: inset 0 0 0 1px var(--ink); }
.btn-primary.large { padding: 20px 30px; font-size: 12px; }
.btn-ghost {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink);
}

/* ---------- section scaffold ---------- */
.section {
  padding: clamp(72px, 10vh, 128px) var(--pad-x);
  max-width: var(--w-max);
  margin: 0 auto;
  border-top: 1px solid var(--ink);
}
.section-muted {
  background: var(--bg-muted);
  max-width: none;
  margin: 0;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  border-top: 1px solid var(--ink);
}
.section-muted > * { max-width: var(--w-max); margin-left: auto; margin-right: auto; }

.section-header {
  margin-bottom: clamp(48px, 6vw, 72px);
  max-width: 780px;
  position: relative;
}
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-kicker {
  display: inline-block;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 24px;
  font-weight: 500;
}
.section-header h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 88px);
  line-height: .95;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.section-header h2 em { font-style: italic; }
.section-note {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 58ch;
}

/* ---------- video grid + cards ---------- */
.video-grid {
  display: grid;
  gap: clamp(20px, 2.5vw, 36px);
}
.video-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.video-grid.grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 1080px; margin-left: auto; margin-right: auto; }
.video-grid.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-left: auto; margin-right: auto; }

.video-card { display: flex; flex-direction: column; gap: 14px; }

.video-frame {
  position: relative;
  background: var(--bg-muted);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--ink);
}
.video-frame.vertical { aspect-ratio: 9 / 16; }
.video-frame video {
  width: 100%; height: 100%; object-fit: cover;
}

.video-frame::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(11,11,11,.035) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #e3dfd2, #b5ae9d);
  opacity: 0;
  transition: opacity var(--t);
}
.video-frame:not(:has(source[src*="."])):not(:has(video[poster])) ::before,
.video-frame.empty::before { opacity: 1; }

.video-play {
  position: absolute;
  left: 50%; top: 50%;
  width: 54px; height: 54px;
  transform: translate(-50%, -50%);
  background: var(--ink);
  color: var(--bg);
  border-radius: 0;
  display: grid; place-items: center;
  transition: transform var(--t), opacity var(--t);
}
.video-play::before {
  content: '';
  border-left: 12px solid var(--bg);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.video-frame.is-playing .video-play { opacity: 0; pointer-events: none; }
.video-frame:hover .video-play { transform: translate(-50%, -50%) scale(1.06); }

.video-meta h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 64px;
  margin-top: 6px;
  margin-bottom: 4px;
}
.brand-logo {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
  /* blend white logo backgrounds into the paper bg */
  mix-blend-mode: multiply;
}
/* per-logo overrides — visual weight varies because of mark padding */
.brand-logo[alt="Replit"]   { height: 58px; }
.brand-logo[alt="Prism AI"] { height: 50px; }
.brand-name {
  display: none;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.brand.no-logo .brand-logo { display: none; }
.brand.no-logo .brand-name { display: block; }
.video-meta .tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 6px;
  margin-bottom: 14px;
}
.video-meta .tag::before { content: '['; padding-right: 2px; }
.video-meta .tag::after  { content: ']'; padding-left: 2px; }
.video-meta dl {
  grid-template-columns: auto 1fr;
  font-size: 13px;
  line-height: 1.5;
  column-gap: 14px;
  row-gap: 6px;
}
.video-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 3px;
}
.video-meta dd { margin: 0; color: var(--ink); }

/* ---------- performance testing ---------- */
.test-package {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  padding-top: clamp(32px, 4vw, 48px);
  margin-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--ink);
}
.test-package:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.test-package-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.test-package-brand {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .18em;
  font-weight: 500;
  color: var(--ink);
}
.test-package-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.1;
  color: var(--ink);
}
.test-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  padding: 8px 0;
}
.test-label::before, .test-label::after {
  content: ''; display: inline-block;
  width: 32px; height: 1px; background: var(--ink);
  vertical-align: middle;
  margin: 0 14px;
}

/* ---------- analytics ---------- */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}
.analytics-col {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 36px);
}
.analytics-shot {
  margin: 0;
  overflow: hidden;
  position: relative;
}
.analytics-shot img {
  width: 100%;
  height: auto;
  display: block;
}
/* strips column: soft container, staggered like a hand-pasted scrapbook */
.analytics-col:first-child .analytics-shot {
  max-width: 78%;
  background: var(--bg-muted);
  border: 1px solid var(--ink);
  padding: 18px 22px;
}
.analytics-col:first-child .analytics-shot:nth-child(1) { margin-left: 0; }
.analytics-col:first-child .analytics-shot:nth-child(2) { margin-left: 14%; }
.analytics-col:first-child .analytics-shot:nth-child(3) { margin-left: 6%; }
/* donut column: framed */
.analytics-col:last-child .analytics-shot {
  background: var(--bg-muted);
  border: 1px solid var(--ink);
}
.analytics-shot:not(:has(img[src])) {
  aspect-ratio: 9 / 16;
  background:
    repeating-linear-gradient(135deg, rgba(11,11,11,.04) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, #e3dfd2, #b5ae9d);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-photo {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg);
  position: sticky;
  top: 100px;
  border: 1px solid var(--ink);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%) contrast(1.02); }
.about-photo img.placeholder,
.about-photo:not(:has(img[src])) {
  background: linear-gradient(180deg, #e3dfd2, #9a9285);
}
.about-copy { display: grid; gap: 18px; font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.about-copy em { color: var(--ink); }
.about-copy p { max-width: 52ch; }
.about-tag {
  font-family: var(--serif);
  font-size: 30px !important;
  line-height: 1.2;
  color: var(--ink) !important;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--ink);
  max-width: 48ch !important;
}

/* ---------- services / contact ---------- */
.section-contact { text-align: center; }
.services {
  display: grid;
  gap: 0;
  max-width: 520px;
  margin: 0 auto 48px;
  text-align: left;
  font-size: 14px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.services li {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-soft);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 500;
}
.services li:last-child { border-bottom: 0; }
.service-dot {
  font-family: var(--mono);
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0;
}
.services li::after {
  content: '→';
  font-family: var(--mono);
  color: var(--ink);
  font-size: 14px;
}

.contact-cta { display: grid; gap: 14px; justify-items: center; }
.contact-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--ink);
}
.footer-inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 36px var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.footer-name {
  font-family: var(--serif); font-style: italic; font-size: 20px;
  justify-self: start;
}
.footer-links { display: flex; gap: 24px; font-size: 10px; letter-spacing: .14em; justify-self: center; }
.footer-links a { color: var(--ink); font-weight: 500; }
.footer-copy {
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-mute);
  justify-self: end;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 360px; }
  .video-grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
  .video-grid.grid-3 { grid-template-columns: repeat(2, 1fr); max-width: 720px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 420px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-name, .footer-links, .footer-copy { justify-self: center; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--ink);
    padding: 0 var(--pad-x);
    max-height: 0; overflow: hidden;
    transition: max-height var(--t), padding var(--t);
  }
  .nav-links.open {
    max-height: 320px;
    padding: 8px var(--pad-x) 20px;
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
  .nav-links a:last-child { border-bottom: 0; }

  .video-grid.grid-4,
  .video-grid.grid-3,
  .video-grid.grid-2 { grid-template-columns: 1fr; }
  .video-frame.vertical { max-width: 360px; margin: 0 auto; width: 100%; }
  .test-package-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .test-package-meta { font-size: 18px; }

  .analytics-grid { grid-template-columns: 1fr; gap: 24px; }
  .analytics-col:first-child .analytics-shot,
  .analytics-col:first-child .analytics-shot:nth-child(n) {
    max-width: 100%;
    margin-left: 0;
  }

  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 56px; }
  .section-header h2 { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
