/* RallySite — shared stylesheet. Used by every page: see AGENTS.md §4.6 before changing. */

:root {
  --ink: #0B1018;
  --ink-2: #121A26;
  --ink-3: #1B2533;
  --ink-line: #263244;
  --ink-text: #C3CCD8;
  --paper: #F4F5F7;
  --white: #FFFFFF;
  --text: #121821;
  --steel: #5B6B80;
  --line: #D9DEE5;
  --signal: #3E7BC4;
  --signal-light: #8DB6E6;

  --rs-black: #0A0A0A;
  --rs-yellow: #F5F97F;
  --pb-black: #0C1412;
  --pb-teal: #6CC9C0;

  --f-head: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --f-rs: "Chakra Petch", var(--f-head);

  --wrap: 1200px;
  --gutter: 24px;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--f-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--signal-light); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.1; margin: 0; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--white); padding: 8px 12px; }

.mono, .eyebrow, .chip {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow { color: var(--steel); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.chip {
  display: inline-block;
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 15px/1 var(--f-body);
  padding: 14px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--white); color: var(--ink); }
.btn--primary:hover { background: var(--signal-light); }
.btn--ghost { color: var(--white); border-color: #3A475A; }
.btn--ghost:hover { border-color: var(--white); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--ink-3); }

/* Notice bar */
.notice { background: var(--ink-2); color: var(--ink-text); border-bottom: 1px solid var(--ink-line); }
.notice .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
.notice a { color: var(--white); text-decoration: none; white-space: nowrap; }
.notice a:hover { text-decoration: underline; }

/* Header */
.site-header { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--ink-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font: 700 20px/1 var(--f-head); letter-spacing: 0.22em; }
.wordmark__mark { width: 22px; height: 22px; border: 2px solid var(--white); position: relative; flex: none; }
.wordmark__mark::after { content: ""; position: absolute; inset: 4px; background: var(--signal-light); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--ink-text); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--white); }
.nav .btn { padding: 10px 16px; font-size: 14px; color: var(--ink); }

/* Hero */
.hero { background: var(--ink); color: var(--white); padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--ink-line) 1px, transparent 1px), linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .35;
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.hero .eyebrow { color: var(--signal-light); }
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); font-weight: 600; margin-bottom: 24px; }
.hero .lead { font-size: 19px; color: var(--ink-text); max-width: 600px; margin-bottom: 32px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero__strip { border-top: 1px solid var(--ink-line); padding-top: 18px; color: var(--ink-text); display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hero__strip span:first-child { color: var(--steel); }

.hero__visual { margin: 0; }
.hero__visual img {
  width: 100%; height: auto;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 47%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 47%, #000 58%, transparent 100%);
}
.hero__visual figcaption { color: var(--steel); font-size: 11px; text-align: center; margin-top: -8px; }

/* Image placeholders (see docs/brand.md) */
.ph {
  margin: 0; position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 18px; background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,.025) 14px 15px);
  color: var(--steel); font-size: 14px; line-height: 1.45; min-height: 160px;
}
.ph__tag { position: absolute; top: 14px; left: 18px; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; }
.ph figcaption { max-width: 34ch; }
.ph--dark { border-color: #3A475A; color: #8592A5; background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.03) 14px 15px); }

/* Sections */
.section { padding: 96px 0; }
.section--white { background: var(--white); }
.section__head { max-width: 760px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(32px, 3.6vw, 44px); font-weight: 600; margin-bottom: 16px; }
.section__head p { color: var(--steel); font-size: 18px; margin: 0; }

/* Product cards */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.product { min-width: 0; border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 22px; color: #D6D6D6; }
.product__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.product__brand { font-size: 15px; font-weight: 700; letter-spacing: .16em; }
.product h3 { font-size: 30px; font-weight: 600; color: var(--white); }
.product p { margin: 0; }
.product ul { display: grid; gap: 10px; }
.product li { padding-left: 22px; position: relative; font-size: 15.5px; }
.product li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; }
.product__links { margin-top: auto; display: flex; gap: 20px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; }
.product__links a { color: var(--white); font-weight: 600; font-size: 15px; text-decoration: none; }
.product__links a:hover { text-decoration: underline; }

.product--rs { background: var(--rs-black); }
.product--rs .product__brand { font-family: var(--f-rs); color: var(--rs-yellow); }
.product--rs .chip { color: var(--rs-yellow); }
.product--rs li::before { background: var(--rs-yellow); }
.product--rs .tagline { font-family: var(--f-rs); color: var(--rs-yellow); font-size: 20px; font-weight: 600; }

.product--pb { background: var(--pb-black); }
.product--pb .product__brand { font-family: var(--f-mono); color: var(--pb-teal); font-weight: 600; font-size: 14px; }
.product--pb .chip { color: var(--pb-teal); }
.product--pb li::before { background: var(--pb-teal); }
.product .ph { aspect-ratio: 16 / 9; min-height: 0; }
.product__media { margin: 0; }
.product__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.08); }

/* IMPULSE labeled diagram */
.diagram { display: grid; grid-template-columns: 8fr 4fr; gap: 40px; align-items: center; margin-bottom: 56px; }
.diagram figure { margin: 0; }
.diagram img { width: 100%; height: auto; border: 1px solid #262626; border-radius: var(--radius); }
.legend li { display: grid; grid-template-columns: 40px 1fr; padding: 14px 0; border-top: 1px solid #262626; }
.legend li:last-child { border-bottom: 1px solid #262626; }
.legend__k { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--rs-yellow); color: var(--rs-yellow); font: 600 13px/25px var(--f-mono); text-align: center; }
.legend strong { color: var(--white); display: block; font-weight: 600; }
.legend span:not(.legend__k) { font-size: 15px; color: #A8A8A8; }

/* IMPULSE deep-dive */
.impulse { background: var(--rs-black); color: #D6D6D6; }
.impulse .eyebrow { color: var(--rs-yellow); }
.impulse .section__head h2 { color: var(--white); font-family: var(--f-rs); }
.impulse .section__head p { color: #B5B5B5; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #262626; border: 1px solid #262626; margin-bottom: 40px; }
.step { background: var(--rs-black); padding: 28px 24px; }
.step__n { font: 600 13px/1 var(--f-mono); color: var(--rs-yellow); letter-spacing: .1em; margin-bottom: 18px; }
.step h3 { font-family: var(--f-rs); color: var(--white); font-size: 22px; margin-bottom: 10px; }
.step p { font-size: 15px; margin: 0; color: #B8B8B8; }
.impulse__media { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 64px; }
.impulse__media .ph { aspect-ratio: 3 / 2; }
.impulse__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.impulse h3.sub { font-family: var(--f-rs); color: var(--white); font-size: 22px; margin-bottom: 20px; }
.apps { display: grid; gap: 0; }
.apps li { padding: 14px 0; border-top: 1px solid #262626; }
.apps li strong { color: var(--white); display: block; font-weight: 600; }
.apps li span { font-size: 15px; color: #A8A8A8; }
.platforms { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.platforms .chip { color: #D6D6D6; border-color: #3A3A3A; }

.integrations { width: 100%; border-collapse: collapse; font-size: 15px; }
.integrations th, .integrations td { text-align: left; padding: 14px 0; border-top: 1px solid #262626; vertical-align: top; }
.integrations th { font: 500 11px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--rs-yellow); width: 38%; padding-right: 16px; }
.integrations td { color: #CFCFCF; }
.impulse__foot { margin-top: 64px; padding-top: 28px; border-top: 1px solid #262626; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.impulse__foot .tagline { font-family: var(--f-rs); color: var(--rs-yellow); font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; }
.impulse__foot .facts { font-size: 14px; color: #A8A8A8; display: grid; gap: 4px; }
.small-note { font-size: 13px; color: #8A8A8A; margin-top: 14px; }

/* Markets */
.markets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.market { background: var(--white); padding: 28px 22px; }
.market__n { font: 500 12px/1 var(--f-mono); color: var(--signal); margin-bottom: 26px; letter-spacing: .1em; }
.market h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.market p { font-size: 15px; color: var(--steel); margin: 0; }

/* Working with us */
.engage { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
.engage__list { display: grid; gap: 0; }
.engage__list li { display: grid; grid-template-columns: 44px 1fr; padding: 22px 0; border-top: 1px solid var(--line); }
.engage__list li:last-child { border-bottom: 1px solid var(--line); }
.engage__list .mono { color: var(--signal); padding-top: 4px; }
.engage__list strong { display: block; font-family: var(--f-head); font-size: 21px; font-weight: 600; margin-bottom: 4px; }
.engage__list p { margin: 0; color: var(--steel); font-size: 15.5px; }
.regcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.regcard h3 { font-size: 24px; font-weight: 600; margin-bottom: 14px; }
.regcard p { color: var(--steel); font-size: 15.5px; }
.regcard dl { margin: 22px 0 26px; display: grid; gap: 0; }
.regcard dt { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--steel); padding-top: 14px; border-top: 1px solid var(--line); }
.regcard dd { margin: 6px 0 14px; font-weight: 500; }

/* Contact band */
.contact { background: var(--ink) url("/assets/img/abstract-rally.webp") center 55% / cover no-repeat; color: var(--white); padding: 88px 0; position: relative; }
.contact::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,16,24,.94) 25%, rgba(11,16,24,.35) 100%); }
.contact .wrap { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.contact h2 { font-size: clamp(32px, 3.8vw, 48px); font-weight: 600; margin-bottom: 16px; }
.contact p { color: var(--ink-text); max-width: 620px; margin: 0; font-size: 18px; }
.contact .eyebrow { color: var(--signal-light); }
.contact__alt { margin-top: 14px; font-size: 14px; color: var(--ink-text); text-align: right; }
.contact__alt a { color: var(--white); }

/* Footer */
.site-footer { background: #070A10; color: #8592A5; padding: 48px 0 40px; font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; }
.site-footer .wordmark { font-size: 16px; margin-bottom: 14px; }
.site-footer .wordmark__mark { width: 18px; height: 18px; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; align-content: start; }
.site-footer nav a { color: var(--ink-text); text-decoration: none; }
.site-footer nav a:hover { color: var(--white); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--ink-line); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; background: var(--ink); color: var(--white); padding: 80px 16px; }
.lost h1 { font-size: 48px; margin: 14px 0 16px; }
.lost p { color: var(--ink-text); }

/* Responsive */
@media (max-width: 1080px) {
  .markets { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .nav a:not(.btn) { display: none; }
  .hero { padding: 56px 0 56px; }
  .hero .wrap, .engage, .impulse__cols, .diagram, .contact .wrap, .site-footer .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero .ph { aspect-ratio: 16 / 10; }
  .products { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .contact__alt { text-align: left; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .notice .wrap { font-size: 12px; }
  .notice__extra { display: none; }
  .wordmark { font-size: 17px; letter-spacing: .18em; }
  .product { padding: 26px 22px; }
  .chip { white-space: normal; }
  .product h3 { font-size: 26px; }
  .steps, .impulse__media, .markets { grid-template-columns: 1fr; }
  .integrations th { width: 42%; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
}
