/* Relay marketing site (`/`): a dark page in Tesseract's family (Jost headings, Inter text,
   the brand gradient), built around the Relay mark. The app's stylesheet isn't loaded here.

   The hero is a tall track with a sticky stage. site.js adds `html.js-aperture` (only with
   motion allowed) and drives it with custom properties on `.hero`:
     --copy-out  0→1  the headline lifts away
     --mx/--my        the mark's centre (px), --ms its size (px), --gx/--gy the glow's centre (%)
     --open      0→1  the aperture opens (rings turn and spread, set on the SVG by site.js)
     --clip           the inbox's reveal circle (px), --reveal 0→1 its scale
     --cap/--w/--wx   the caption, the chat window's fade and slide
   and `data-step` (0–4) on .hero plays the chat. Without that class (no JS, or reduced
   motion) the stage is laid out plainly as its last frame. */

@font-face {
  font-family: "Jost";
  src: url("/fonts/Jost-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Text colours are checked against their backgrounds (AA) by site.rs's tests. */
  --bg: #05060d;
  --night: #050826;
  --panel: #0d1020;
  --light: #ffffff;
  --text: #f3f5fb;
  --muted: #a4acc4;
  --ink: #0b1324;
  --cyan: #8fe3ff;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  /* The light look (html.look-light, set by look.js): the sections between the hero and the closing call to
     action on paper, like Tesseract's site. */
  --paper: #ffffff;
  --paper-panel: #f5f7fb;
  --paper-text: #0b1324;
  --paper-muted: #4a5570;
  --accent: #4636f0;
  /* Tesseract's brand gradient. */
  --g-cyan: #1fb6ff;
  --g-blue: #1d5cff;
  --g-navy: #0d1f9e;
  --g-violet: #6d1ff0;
  --g-purple: #a24bff;
  --g-lilac: #e7a6ff;
  --display: "Jost", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
  background: var(--bg);
  color-scheme: dark;
}

html.look-light { color-scheme: light; }

/* Themed screenshots come in both versions; only the look's one shows (and, being lazy, only
   it is fetched). */
html:not(.look-light) .for-light,
.look-light .for-dark { display: none; }

body.site {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main:focus { outline: none; }

a { color: inherit; }

img, svg { display: block; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; }

p { margin: 0; }

code, kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font: 0.88em var(--mono);
}

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

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--light);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.wrap { width: min(1200px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { width: min(820px, 100%); }
.center { text-align: center; }

.text-link {
  color: var(--cyan);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(143, 227, 255, 0.4);
  text-underline-offset: 4px;
}

.text-link:hover { text-decoration-color: currentColor; }

.wide-only { display: none; }
.narrow-only { display: inline; }

@media (min-width: 520px) {
  .wide-only { display: inline; }
  .narrow-only { display: none; }
}

/* ---------------------------------------------------------------- buttons --- */

.sbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.sbtn:hover { transform: translateY(-1px); }
.sbtn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.sbtn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }

.sbtn-light {
  background: var(--light);
  color: var(--ink);
  box-shadow: 0 12px 34px -14px rgba(143, 227, 255, 0.85);
}

.sbtn-light:hover { box-shadow: 0 16px 40px -12px rgba(143, 227, 255, 0.95); }

.sbtn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--text);
}

.sbtn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.sbtn[hidden] { display: none; }

/* ----------------------------------------------------------------- header --- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 36px;
  height: 76px;
  padding: 0 var(--gutter);
  transition: background-color 250ms var(--ease), box-shadow 250ms var(--ease);
}

.site-header.is-scrolled {
  background: rgba(5, 6, 13, 0.74);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.site-brand { display: inline-flex; color: var(--text); text-decoration: none; border-radius: 8px; }

/* The lockup in the logo's proportions: gap 0.31 × the mark, capitals 0.30 × the mark. */
.wordmark { display: inline-flex; align-items: center; gap: 12px; }
.wordmark .mark { width: 40px; height: 40px; flex: none; }

.wordmark-text {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.25em;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }

.site-nav a,
.site-login {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.82;
}

.site-nav a:hover,
.site-login:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

.site-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* The sun/moon switch: the icon says where it goes (sun on dark, moon on light). */
.look-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.look-toggle[hidden] { display: none; }
.look-toggle:hover { background: rgba(255, 255, 255, 0.08); }
.look-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.look-toggle svg { display: block; }
.look-toggle .look-moon,
.look-light .look-toggle .look-sun { display: none; }
.look-light .look-toggle .look-moon { display: block; }

/* ------------------------------------------------------------------- hero --- */

.hero { position: relative; background: var(--night); }

.stage { position: relative; isolation: isolate; overflow: hidden; }

/* The signal: a cyan core under the mark, Tesseract's gradient spreading out from it. */
.glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at var(--gx, 72%) var(--gy, 46%),
      rgba(143, 227, 255, calc(0.55 + var(--open, 0) * 0.3)) 0,
      rgba(31, 182, 255, 0.45) 6%,
      rgba(29, 92, 255, 0.42) 15%,
      rgba(13, 31, 158, 0.55) 27%,
      rgba(74, 18, 214, 0.36) 41%,
      rgba(109, 31, 240, 0.2) 53%,
      transparent 68%),
    radial-gradient(90% 60% at 12% 110%, rgba(162, 75, 255, 0.42), transparent 60%),
    radial-gradient(70% 50% at 100% -10%, rgba(231, 166, 255, 0.16), transparent 60%),
    var(--night);
}

.hero-copy { position: relative; z-index: 2; }

.hero h1 {
  max-width: 12ch;
  margin-bottom: 24px;
  font-size: clamp(42px, 5.6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero-lead {
  max-width: 34em;
  margin-bottom: 34px;
  color: rgba(243, 245, 251, 0.82);
  font-size: clamp(17px, 1.35vw, 19px);
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-ctas.center { justify-content: center; }

.hero-by { margin-top: 28px; color: var(--muted); font-size: 13px; letter-spacing: 0.02em; }

.aperture { z-index: 1; pointer-events: none; color: #fff; }

.big-mark { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 30px rgba(143, 227, 255, 0.35)); }

.product { position: relative; z-index: 3; margin: 0; }

.product-shot {
  overflow: hidden;
  border-radius: 14px;
  background: #0b0d18;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.product-img { width: 100%; height: auto; }

.product-caption {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
}

/* The visitor's chat window, beside the inbox. */
.chat-window {
  position: absolute;
  right: -28px;
  bottom: -40px;
  z-index: 2;
  width: min(340px, 38vw);
  overflow: hidden;
  border-radius: 20px;
  /* The real widget's colours: its dark scheme here, its light one on the light look. */
  --cw-bg: #121212;
  --cw-text: #f5f5f5;
  --cw-surface: #1f1f1f;
  --cw-muted: #a3a3a3;
  --cw-dots: #737373;
  --cw-edge: rgba(255, 255, 255, 0.1);
  background: var(--cw-bg);
  color: var(--cw-text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--cw-edge);
  font-size: 14px;
  line-height: 1.45;
}

.look-light .chat-window {
  --cw-bg: #ffffff;
  --cw-text: #0b1324;
  --cw-surface: #eef1f6;
  --cw-muted: #5d6780;
  --cw-dots: #98a1b5;
  --cw-edge: rgba(11, 19, 36, 0.06);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(120deg, #0e5fa8, #1d8ac9);
  color: #fff;
}

.chat-who { display: grid; }
.chat-who small { opacity: 0.85; font-size: 12px; }

.chat-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.chat-body { display: grid; align-content: start; gap: 8px; min-height: 236px; padding: 14px; }

.bubble { max-width: 86%; padding: 9px 13px; border-radius: 18px; }
.bubble-visitor { justify-self: end; background: #1d8ac9; color: #fff; border-bottom-right-radius: 6px; }
.bubble-team { justify-self: start; background: var(--cw-surface); border-bottom-left-radius: 6px; }
.seen { justify-self: end; margin-top: -4px; color: var(--cw-muted); font-size: 12px; }

.typing {
  display: none;
  justify-self: start;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 18px;
  background: var(--cw-surface);
}

.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--cw-dots); animation: typing 1s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing { 50% { opacity: 0.3; } }

/* Without the scroll stage: the hero as a plain two-part layout, chat fully played. */
html:not(.js-aperture) .stage {
  display: grid;
  gap: 72px;
  padding: 150px var(--gutter) 140px;
}

html:not(.js-aperture) .hero-copy { width: min(1200px, 100%); margin: 0 auto; }
html:not(.js-aperture) .glow { --gx: 76%; --gy: 22%; }

html:not(.js-aperture) .aperture {
  position: absolute;
  right: max(var(--gutter), calc(50% - 600px + var(--gutter)));
  top: 120px;
  width: min(360px, 30vw);
  height: min(360px, 30vw);
}

html:not(.js-aperture) .product { width: min(1120px, 100%); margin: 0 auto; }
html:not(.js-aperture) .product-caption { order: -1; margin-bottom: 24px; }
html:not(.js-aperture) .product { display: flex; flex-direction: column; }

/* With the scroll stage. */
.js-aperture .hero { height: 340vh; }

.js-aperture .stage { position: sticky; top: 0; height: 100vh; height: 100svh; }

.js-aperture .hero-copy {
  position: absolute;
  left: max(var(--gutter), calc(50% - 600px + var(--gutter)));
  top: 50%;
  width: min(600px, 46vw);
  opacity: calc(1 - var(--copy-out, 0));
  transform: translateY(calc(-50% - var(--copy-out, 0) * 60px));
  visibility: var(--copy-vis, visible);
}

.js-aperture .aperture {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--ms, 520px);
  height: var(--ms, 520px);
  transform: translate(calc(var(--mx, 900px) - 50%), calc(var(--my, 450px) - 50%));
}

.js-aperture .product {
  position: absolute;
  left: 50%;
  top: 57%;
  width: min(1100px, 84vw, 128vh);
  transform: translate(-50%, -50%) scale(calc(0.82 + var(--reveal, 0) * 0.18));
  pointer-events: var(--product-events, none);
}

.js-aperture .product-shot { clip-path: circle(var(--clip, 0px) at 50% 50%); }

.js-aperture .product-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 22px);
  opacity: var(--cap, 0);
  transform: translateY(calc((1 - var(--cap, 0)) * 14px));
}

.js-aperture .chat-window {
  opacity: var(--w, 0);
  transform: translate(calc((1 - var(--wx, 0)) * 80px), calc((1 - var(--wx, 0)) * 24px));
}

.js-aperture .step-1,
.js-aperture .step-3,
.js-aperture .step-4 { opacity: 0; transform: translateY(8px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); }

.js-aperture [data-step="1"] .step-1,
.js-aperture [data-step="2"] .step-1,
.js-aperture [data-step="3"] .step-1,
.js-aperture [data-step="4"] .step-1,
.js-aperture [data-step="3"] .step-3,
.js-aperture [data-step="4"] .step-3,
.js-aperture [data-step="4"] .step-4 { opacity: 1; transform: none; }

.js-aperture [data-step="2"] .typing { display: inline-flex; }
.js-aperture [data-step="2"] .step-3,
.js-aperture [data-step="2"] .step-4 { display: none; }

/* -------------------------------------------------------------- audiences --- */

.audiences { position: relative; padding: 120px 0 40px; }

.audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.audience {
  display: flex;
  flex-direction: column;
  padding: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(31, 182, 255, 0.14), transparent 55%),
    var(--panel);
}

#business {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(162, 75, 255, 0.18), transparent 55%),
    var(--panel);
}

.kicker { margin-bottom: 14px; color: var(--cyan); font-size: 15px; font-weight: 600; }

.audience h2 { margin-bottom: 14px; font-size: clamp(30px, 3vw, 42px); line-height: 1.08; letter-spacing: -0.02em; }

.audience-lead { margin-bottom: 26px; color: var(--muted); }

.ticks { display: grid; gap: 14px; margin: 0 0 32px; padding: 0; list-style: none; }

.ticks li { position: relative; padding-left: 30px; color: var(--muted); }
.ticks strong { color: var(--text); font-weight: 600; }

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--cyan) 0 3px, transparent 3.5px),
    radial-gradient(circle, transparent 5.5px, rgba(143, 227, 255, 0.55) 6px 7.5px, transparent 8px);
}

.audience-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: auto; }

/* --------------------------------------------------------------- chapters --- */

.chapter { padding: 130px 0 0; }

.chapter-head { max-width: 760px; margin-bottom: 56px; }

.chapter h2 { margin-bottom: 18px; font-size: clamp(34px, 4vw, 56px); line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; }

.lead { color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); }

.aside { margin-top: 28px; color: var(--muted); font-size: 14px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.split .chapter-head { margin-bottom: 32px; }

.features { display: grid; gap: 36px 32px; margin: 0; padding: 0; list-style: none; }
.features-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; }
.features-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.feature h3 { margin: 16px 0 8px; font-size: 20px; letter-spacing: -0.005em; }
.feature p { color: var(--muted); font-size: 15px; }

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(31, 182, 255, 0.16), rgba(109, 31, 240, 0.16));
  color: var(--cyan);
}

.features-compact { gap: 30px 32px; padding-top: 40px; border-top: 1px solid var(--line); }
.features-compact .feature h3 { font-size: 18px; }

.shot-frame {
  overflow: hidden;
  border-radius: 14px;
  background: #0b0d18;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line-strong);
}

.shot-img { width: 100%; height: auto; }

.shot-tall { width: min(440px, 100%); justify-self: center; border-radius: 22px; }

.steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }

.steps li { position: relative; padding-left: 46px; color: var(--muted); counter-increment: step; }
.steps strong { color: var(--text); font-weight: 600; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(143, 227, 255, 0.45);
  border-radius: 50%;
  color: var(--cyan);
  font: 600 14px/1 var(--sans);
}

/* Slack illustration. */
.slack-card {
  margin: 0;
  padding: 8px 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #15171f;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
  font-size: 15px;
  line-height: 1.45;
}

.slack-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.slack-logo { width: 26px; height: 26px; }

.slack-msg { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 16px 22px 0; }
.slack-reply { margin-left: 50px; padding-left: 14px; border-left: 2px solid var(--line-strong); }

.slack-av {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #3a4258;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.relay-av { background: var(--night); color: #fff; }
.relay-av .mark { width: 26px; height: 26px; }

.slack-name { font-weight: 700; }

.app-tag {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 2px;
}

.slack-msg .quote { margin-top: 6px; padding-left: 12px; border-left: 3px solid #1d8ac9; color: #d9deea; }
.slack-replies { margin-top: 8px; color: var(--cyan); font-size: 13px; font-weight: 600; }
.muted-line { color: var(--muted); font-size: 14px; }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trio-item { margin: 0; }
.trio-item figcaption { margin-top: 16px; color: var(--muted); font-size: 15px; }
.trio-item strong { color: var(--text); }

/* Security. */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  list-style: none;
  overflow: hidden;
}

.security-grid li { padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.security-grid li:nth-child(3n) { border-right: 0; }
.security-grid li:nth-last-child(-n + 3) { border-bottom: 0; }
.security-grid h3 { margin-bottom: 8px; font-size: 19px; }
.security-grid p { color: var(--muted); font-size: 15px; }

.pricing .lead { margin: 0 auto 32px; max-width: 36em; }
.pricing h2 { font-size: clamp(34px, 4vw, 52px); }

/* FAQ. */
#faq h2 { margin-bottom: 32px; font-size: clamp(30px, 3vw, 42px); }

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after { content: "+"; color: var(--cyan); font-size: 22px; line-height: 1; transition: transform 200ms var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer { padding: 0 0 24px; color: var(--muted); }
.faq-answer p + p, .faq-answer p + pre { margin-top: 12px; }

.snippet {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.snippet code { padding: 0; border: 0; background: none; color: var(--text); font-size: 13px; }

/* Closing. */
.closing { position: relative; overflow: hidden; margin-top: 140px; padding: 140px 0; isolation: isolate; }

.closing-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 38%, rgba(143, 227, 255, 0.5) 0, rgba(29, 92, 255, 0.4) 12%, rgba(13, 31, 158, 0.5) 26%, rgba(109, 31, 240, 0.22) 44%, transparent 62%),
    var(--night);
}

.closing-mark { width: 120px; height: 120px; margin: 0 auto 36px; color: #fff; filter: drop-shadow(0 0 24px rgba(143, 227, 255, 0.45)); }
.closing h2 { margin-bottom: 16px; font-size: clamp(36px, 4.6vw, 62px); line-height: 1.04; letter-spacing: -0.025em; }
.closing .lead { margin: 0 auto 34px; max-width: 32em; color: rgba(243, 245, 251, 0.82); }

/* Footer. */
.site-footer { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand { display: grid; gap: 14px; max-width: 380px; color: var(--muted); font-size: 15px; }
.footer-by { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.footer-by a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.footer-by a:hover { color: var(--text); text-decoration-color: currentColor; }
.us-flag { flex: none; display: block; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-strong); }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 48px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); font-size: 15px; text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* -------------------------------------------------------------- light look --- */

/* The hero and the closing stay dark; everything between is on paper. The tokens are swapped
   per section, so every rule above applies unchanged. */
.look-light .audiences,
.look-light .chapter,
.look-light .site-footer {
  --text: var(--paper-text);
  --muted: var(--paper-muted);
  --cyan: var(--accent);
  --panel: var(--paper-panel);
  --line: rgba(11, 19, 36, 0.09);
  --line-strong: rgba(11, 19, 36, 0.14);
  background: var(--paper);
  color: var(--text);
}

.look-light body.site { background: var(--paper); }
.look-light .closing { margin-top: 0; }
.look-light .chapter:last-of-type { padding-bottom: 130px; }
.look-light #faq { padding-bottom: 130px; }

.look-light .audience {
  border-color: rgba(11, 19, 36, 0.1);
  background: radial-gradient(120% 80% at 0% 0%, rgba(31, 182, 255, 0.1), transparent 55%), var(--paper-panel);
  box-shadow: 0 30px 60px -40px rgba(13, 31, 158, 0.25);
}

.look-light #business {
  background: radial-gradient(120% 80% at 100% 0%, rgba(162, 75, 255, 0.12), transparent 55%), var(--paper-panel);
}

.look-light .ticks li::before {
  background:
    radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px),
    radial-gradient(circle, transparent 5.5px, rgba(70, 54, 240, 0.45) 6px 7.5px, transparent 8px);
}

.look-light .steps li::before { border-color: rgba(70, 54, 240, 0.4); }

.look-light .feature-icon {
  border-color: rgba(70, 54, 240, 0.16);
  background: linear-gradient(140deg, rgba(31, 182, 255, 0.1), rgba(109, 31, 240, 0.1));
}

.look-light .shot-frame { background: #fff; box-shadow: 0 30px 70px -36px rgba(13, 31, 158, 0.35), 0 0 0 1px rgba(11, 19, 36, 0.08); }

.look-light .chapter .sbtn-light,
.look-light .audiences .sbtn-light { background: var(--paper-text); color: #fff; box-shadow: none; }

.look-light .chapter .sbtn-ghost { border-color: rgba(11, 19, 36, 0.3); color: var(--paper-text); }
.look-light .chapter .sbtn-ghost:hover { background: rgba(11, 19, 36, 0.05); }

.look-light .text-link { text-decoration-color: rgba(70, 54, 240, 0.35); }

.look-light code,
.look-light kbd { background: rgba(11, 19, 36, 0.04); }

/* The Slack illustration keeps its dark card on paper: it's a picture of a dark app. */
.look-light .slack-card {
  --text: #f3f5fb;
  --muted: #a4acc4;
  --cyan: #8fe3ff;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  color: var(--text);
  box-shadow: 0 30px 70px -36px rgba(13, 31, 158, 0.45);
}

/* Over paper, the header turns to paper too (site.js: .is-paper once past the hero). */
.site-header.is-paper {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(11, 19, 36, 0.08);
  color: var(--paper-text);
}

.site-header.is-paper .site-brand,
.site-header.is-paper .site-nav a,
.site-header.is-paper .site-login { color: var(--paper-text); }

.site-header.is-paper .look-toggle { border-color: rgba(11, 19, 36, 0.2); }
.site-header.is-paper .look-toggle:hover { background: rgba(11, 19, 36, 0.05); }
.site-header.is-paper .look-toggle:focus-visible { outline-color: var(--accent); }

.site-header.is-paper .sbtn-light { background: var(--paper-text); color: #fff; box-shadow: none; }

/* -------------------------------------------------------------- narrower --- */

@media (max-width: 1080px) {
  .site-nav { display: none; }
  .features-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .audience-grid,
  .split,
  .trio { grid-template-columns: minmax(0, 1fr); }
  .split { gap: 48px; }
  .split-flip > :first-child { order: 1; }
  .security-grid { grid-template-columns: minmax(0, 1fr); }
  .security-grid li { border-right: 0; border-bottom: 1px solid var(--line); }
  .security-grid li:last-child { border-bottom: 0; }
  .features-3 { grid-template-columns: minmax(0, 1fr); }
  html:not(.js-aperture) .aperture { display: none; }
}

@media (max-width: 640px) {
  body.site { font-size: 16px; }
  .site-header { height: 64px; gap: 12px; }
  .wordmark .mark { width: 32px; height: 32px; }
  .wordmark { gap: 10px; }
  .wordmark-text { font-size: 14px; }
  .site-login { display: none; }
  .audience { padding: 30px 24px; }
  .features-4 { grid-template-columns: minmax(0, 1fr); }
  .chapter { padding-top: 96px; }
  .slack-reply { margin-left: 24px; }

  .js-aperture .hero-copy {
    top: auto;
    bottom: 6svh;
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    transform: translateY(calc(var(--copy-out, 0) * -60px));
  }

  .hero h1 { font-size: 38px; margin-bottom: 14px; }
  .hero-lead { font-size: 16px; margin-bottom: 20px; }
  .hero-by { margin-top: 16px; }
  .js-aperture .product { width: 92vw; top: 46%; }
  .chat-window { right: 0; bottom: -160px; width: 76vw; }
  html:not(.js-aperture) .chat-window { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 20px; }
  .js-aperture .product-caption { font-size: 21px; }
  .footer-links { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .sbtn, .site-header, .faq-item summary::after { transition: none; }
  .sbtn:hover { transform: none; }
  .typing span { animation: none; }
}
