/* Tandem AI Labs — one stylesheet for every page.
   Indigo (the Indian dye colour) and a soft periwinkle on white and a pale indigo mist.
   The two-circle mark is the one bold element: two things working in tandem.
   Space Grotesk for headings and the name, Inter for reading. Fonts are self-hosted
   (assets/fonts, SIL Open Font License). No scripts. Dark mode follows the system setting. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 650; font-display: swap; src: url(/assets/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 650; 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: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/space-grotesk-500.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/space-grotesk-600.woff2) format("woff2"); }

:root {
  color-scheme: light dark;

  --paper: #ffffff;
  --mist: #f3f4fa;
  --ink: #141a33;
  --slate: #575e79;
  --line: #e2e5ef;
  --indigo: #3346c8;
  --indigo-strong: #2636a8;
  --peri: #a3b0f7;
  --deep: #1b2477;
  --pill-bg: #eaedfd;
  --pill-ink: #2d3db3;
  --blank-bg: #fff1b8;
  --blank-ink: #5a4300;

  /* The footer is always on the dark night colour. */
  --night: #11152b;
  --night-ink: #eceefb;
  --night-muted: #a2a8c7;
  --night-line: #272d4c;
  --night-a: #8f9cff;
  --night-b: #3d49b8;
  --night-lens: #c9cfff;

  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: 16px;
  --page: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1022;
    --mist: #131733;
    --ink: #eceefb;
    --slate: #a6abc9;
    --line: #262b4b;
    --indigo: #8f9cff;
    --indigo-strong: #b4bcff;
    --peri: #3d49b8;
    --deep: #c9cfff;
    --pill-bg: #1f2650;
    --pill-ink: #c3caff;
    --blank-bg: #4a3a00;
    --blank-ink: #ffe9a0;
    --night: #080a17;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a { color: var(--indigo); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--indigo-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -56px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.skip:focus { top: 12px; }

/* The mark: two circles in tandem, the overlap in a third tone. */
.m-a { fill: var(--indigo); }
.m-b { fill: var(--peri); }
.m-lens { fill: var(--deep); }

/* Top bar */

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand .mark { width: 36px; height: 23px; flex: none; }
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.top-nav { display: flex; gap: 28px; }
.top-nav a {
  color: var(--slate);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  padding: 6px 0;
}
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--ink); }

/* Home: hero */

.hero { background: var(--mist); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: 112px;
  padding-bottom: 120px;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.lede {
  margin: 24px 0 0;
  max-width: 30ch;
  color: var(--slate);
  font-size: 21px;
  line-height: 1.5;
}
.hero-mark { width: 100%; max-width: 420px; justify-self: end; overflow: visible; }

/* One moment on load: the two circles slide together. */
.hero-mark .m-a { animation: tandem-a 900ms cubic-bezier(.2, .7, .2, 1) both; }
.hero-mark .m-b { animation: tandem-b 900ms cubic-bezier(.2, .7, .2, 1) both; }
.hero-mark .m-lens { animation: tandem-lens 420ms ease-out 620ms both; }
@keyframes tandem-a { from { transform: translateX(-9px); } }
@keyframes tandem-b { from { transform: translateX(9px); } }
@keyframes tandem-lens { from { opacity: 0; } }

/* Home: products */

.products { padding: 88px 0 96px; }
.products h2 {
  margin: 0 0 32px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.product {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
}
.product:hover { border-color: var(--indigo); color: var(--ink); }
.product-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}
.product h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.product p { margin: 0 0 28px; color: var(--slate); font-size: 17px; max-width: 36ch; }
.go { margin-top: auto; color: var(--indigo); font-weight: 500; font-size: 15px; }
.product:hover .go { text-decoration: underline; text-underline-offset: 3px; }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-family: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
}

/* Text pages: title band, then the text, with "On this page" on wide screens */

.page-head { background: var(--mist); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 72px; padding-bottom: 48px; }
.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.updated { margin: 14px 0 0; color: var(--slate); font-size: 15px; }

.doc-body { padding-top: 56px; padding-bottom: 104px; }

.toc { display: none; }

.prose { max-width: 680px; font-size: 17px; line-height: 1.7; }
.prose h2 {
  margin: 56px 0 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  scroll-margin-top: 24px;
}
.prose h3 { margin: 36px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.4; scroll-margin-top: 24px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0; padding-left: 22px; }
.prose li { margin: 6px 0; padding-left: 4px; }
.prose li::marker { color: var(--indigo); }
.prose strong { font-weight: 600; }

.page-contact .prose p {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.blank {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--blank-bg);
  color: var(--blank-ink);
  font-weight: 500;
}

@media (min-width: 1024px) {
  .doc-body.has-toc {
    display: grid;
    grid-template-columns: 220px minmax(0, 680px);
    gap: 80px;
  }
  .toc {
    display: block;
    position: sticky;
    top: 32px;
    align-self: start;
    font-size: 14px;
    line-height: 1.4;
  }
  .toc-title { margin: 0 0 12px; font-weight: 600; color: var(--ink); }
  .toc ul { list-style: none; margin: 0; padding: 0; }
  .toc a {
    display: block;
    padding: 6px 0 6px 14px;
    border-left: 2px solid var(--line);
    color: var(--slate);
    text-decoration: none;
  }
  .toc a:hover { color: var(--ink); border-left-color: var(--indigo); }
  .toc .toc-l3 a { padding-left: 26px; }
}

/* Footer: always on the night colour */

.site-footer { background: var(--night); color: var(--night-ink); padding: 56px 0 40px; }
.site-footer .m-a { fill: var(--night-a); }
.site-footer .m-b { fill: var(--night-b); }
.site-footer .m-lens { fill: var(--night-lens); }
.site-footer .brand, .site-footer .brand:hover { color: var(--night-ink); }
.site-footer :focus-visible { outline-color: var(--night-a); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.foot-line { margin: 0; color: var(--night-muted); font-size: 15px; }
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
  font-size: 14px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-links a { color: var(--night-muted); text-decoration: none; padding: 2px 0; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--night-ink); }
.copy { margin: 0; color: var(--night-muted); }

/* Phones and small tablets */

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; padding-bottom: 64px; }
  .hero-mark { order: -1; max-width: 148px; justify-self: start; }
  .lede { font-size: 18px; margin-top: 16px; }
  .products { padding: 56px 0 72px; }
  .products h2 { font-size: 26px; margin-bottom: 20px; }
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product { padding: 24px; border-radius: 16px; }
  .product h3 { font-size: 22px; margin-top: 18px; }
  .product p { font-size: 16px; margin-bottom: 20px; }
  .page-head .wrap { padding-top: 44px; padding-bottom: 32px; }
  .doc-body { padding-top: 36px; padding-bottom: 72px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 22px; margin-top: 44px; }
  .site-footer { padding: 44px 0 32px; }
}

@media (max-width: 400px) {
  .top-nav { gap: 18px; }
  .brand-name { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark .m-a, .hero-mark .m-b, .hero-mark .m-lens { animation: none; }
}

@media (forced-colors: active) {
  .product { border-color: CanvasText; }
  .pill, .blank { border: 1px solid CanvasText; }
  .m-a, .m-b, .m-lens { fill: CanvasText; }
  .m-lens { fill: Canvas; }
}
