/* Saywit public site: shared tokens, primitives and page chrome for every public page. */

:root {
  color-scheme: light;

  --paper: #f8f7ef;
  --paper-2: #eeefe3;
  --paper-3: #e0e5d6;
  --surface: #fcfcf7;
  --ink: #35483f;
  --ink-2: #3f5f4d;
  --ink-deep: #1a2823;
  --muted: #5c665f;
  --faint: #596b5e;
  --line: #d7ddce;
  --line-soft: #e5e8dc;
  --lime: #dce6cf;
  --lime-strong: #c5d3b6;
  --lime-wash: #eef2e5;
  --signal: #4c7b38;
  --peach: #f4d8c2;
  --sky: #d3e2e3;
  --lilac: #e2dcef;
  --sand: #ece3cf;
  --coral: #d9654b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .64, 1);
  --shadow-float:
    0 60px 120px -50px rgba(26, 40, 35, .45),
    0 24px 48px -28px rgba(26, 40, 35, .28),
    0 0 0 1px rgba(35, 53, 47, .07);
}

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

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

body {
  margin: 0;
  min-width: 280px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--ink-2); }

.shell { width: min(1240px, calc(100% - 128px)); margin-inline: auto; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 10px;
  background: #e8eada;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Brand */
.wordmark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -1.5px;
  color: var(--ink);
  text-decoration: none;
}
.wordmark svg { width: 28px; height: 30px; flex: none; }
.wordmark .saywit-logo { display: block; width: auto; height: 34px; flex: none; object-fit: contain; }
.help-header .wordmark .saywit-logo { height: 30px; }
#main:focus { outline: none; }

/* ───────── Site header: one aligned bar for the landing, product, guide and legal pages ───────── */
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px 24px;
  min-height: 76px;
  padding-top: 32px;
}
.topbar .wordmark { min-height: 44px; }
.topbar__label {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.topbar__label::before { content: ""; width: 1px; height: 22px; background: var(--line); }
.topbar__meta { display: flex; align-items: center; gap: 4px 22px; margin-left: auto; }
.topbar__clock { min-width: 21ch; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.topbar__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.topbar__link:hover, .topbar__link[aria-current] { color: var(--ink); }
.topbar__link[aria-current] { text-decoration-line: underline; text-decoration-color: var(--lime-strong); }
.topbar__action { flex: none; }
.btn--small { min-height: 44px; gap: 12px; padding: 5px 5px 5px 16px; font-size: 14px; }
.btn--small .btn__arrow { width: 32px; height: 32px; font-size: 14px; }

/* Quiet underlined links. One continuous underline, including a trailing arrow; 44px tall. */
.text-link {
  display: inline-block;
  padding-block: 11px;
  line-height: 22px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--lime-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color .2s var(--ease);
}
.text-link:hover { text-decoration-color: var(--ink); }
button.text-link { padding: 0; border: 0; background: none; cursor: pointer; }

/* Section rhythm shared by the landing and product pages. */
.section-title {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.hero__actions, .closing__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.hero__actions { margin-top: 36px; }

/* ───────── Shared public footer and its quiet signature ───────── */
.site-footer {
  display: grid;
  gap: 6px;
  padding-block: 28px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.site-footer a { text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--ink); text-decoration-line: underline; }
.site-footer__main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; }
.site-footer__brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.site-footer__brand .saywit-logo { display: block; width: auto; height: 22px; }
.site-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 26px; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.site-footer__links a[aria-current] { color: var(--ink); }
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}
.site-footer__meta > p { margin: 0; }

.site-credit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
}
.site-credit svg { flex: none; fill: var(--faint); }
.site-credit a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: inherit;
  font-weight: 600;
}
.site-credit a:hover { color: var(--ink); }

/* Eyebrow: a numbered, quiet label above each section title. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  color: var(--muted);
}
.eyebrow-index {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 7px;
  color: var(--ink);
  opacity: .9;
}

/* A lime highlighter stroke behind a key word; on dark surfaces the word itself turns lime. */
.mark { position: relative; z-index: 0; font-style: normal; white-space: nowrap; }
.mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.04em;
  right: -.02em;
  bottom: .06em;
  height: .38em;
  border-radius: .06em;
  background: var(--lime);
  transform-origin: left center;
}
.on-dark .mark { color: var(--ink-2); }
.on-dark .mark::before { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 52px;
  padding: 8px 8px 8px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--ink { background: #e8eada; color: var(--ink); box-shadow: 0 12px 24px -14px rgba(26, 40, 35, .18); }
.btn--ink:hover { background: #dfe5d1; transform: translateY(-1px); }
.btn--ink:active { transform: translateY(0) scale(.99); }
.btn--block { width: 100%; justify-content: space-between; }
.btn__arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 16px;
  transition: transform .35s var(--ease-spring);
}
.btn:hover .btn__arrow { transform: rotate(45deg); }

/* Scroll reveal (JS adds .js to <html> and .is-in to elements). */
.js.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js.reveal-enabled .reveal.is-in { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@media (max-width: 1100px) {
  .topbar__clock { display: none; }
}
@media (max-width: 900px) {
  .shell { width: calc(100% - 64px); }
  .topbar__label { display: none; }
}
@media (max-width: 640px) {
  /* Brand and the main action share the first row; the links follow on their own row. */
  .topbar { flex-wrap: wrap; row-gap: 4px; min-height: 0; padding-top: 18px; }
  .topbar__action { margin-left: auto; }
  .topbar__meta {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 0 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar__meta::-webkit-scrollbar { display: none; }
  .site-footer { padding-block: 22px 26px; }
  /* Footer links settle into aligned columns instead of leaving one link alone on a row. */
  .site-footer__links { display: grid; grid-template-columns: repeat(3, max-content); gap: 0 24px; }
  .site-footer__meta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 340px) {
  .site-footer__links { grid-template-columns: repeat(2, max-content); }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 40px); }
  .wordmark { font-size: 25px; }
  .wordmark svg { width: 25px; height: 27px; }
  .wordmark .saywit-logo, .help-header .wordmark .saywit-logo { height: 28px; }
}
@media (max-width: 380px) {
  .topbar { column-gap: 12px; }
  .topbar .wordmark .saywit-logo { height: 24px; }
  .topbar .btn--small { padding: 5px 16px; }
  .topbar .btn--small .btn__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
}

/* One compact control for decorative motion; content remains readable when paused. */
.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.motion-toggle:hover { background: var(--paper-2); color: var(--ink); }
.motion-toggle:disabled { cursor: default; }
.on-dark .motion-toggle { align-self: flex-start; margin-bottom: 12px; border-color: rgba(63, 95, 77, .2); color: var(--ink); }
.on-dark .motion-toggle:hover { background: rgba(252, 252, 247, .7); }
.page-hidden *, .page-hidden *::before, .page-hidden *::after { animation-play-state: paused !important; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
.motion-paused .reveal,
.motion-paused .hero__copy .eyebrow,
.motion-paused .hero__lede,
.motion-paused .hero__actions,
.motion-paused .scene-picker,
.motion-paused .stage__note,
.motion-paused .chat--hero,
.motion-paused .chat--auth,
.motion-paused .auth__form > *,
.motion-paused .chat__body:not(.is-live) > * { opacity: 1 !important; transform: none !important; }
.motion-paused .hero__title .line > span,
.motion-paused .mark::before { transform: none !important; }
.motion-paused .pbubble { opacity: 1; transform: none; }
