/* Base styles shared by every page: tokens, type, header, phone menu, footer,
   buttons, pills, blog cards and the newsletter band (kept for later;
   no page shows it until there is a sign-up service). Each page adds one small
   stylesheet of its own. */

/* ---------- Tokens */
:root {
  --ink: #1B1C22;
  --muted: #5E6170;
  --grey: #8A8DA0;
  --accent: #4B4DED;
  --accent-ink: #3A3CCB;
  --accent-deep: #2F31B8;
  --accent-tint: #EEEEFD;
  --accent-wash: #FBFBFF;
  --line: #E4E5EC;
  --line-soft: #EDEEF3;
  --line-strong: #D4D6E0;
  --line-mid: #C9CBD6;
  --tint: #FAFAFC;
  --hover: #F6F6FB;
  --white: #FFFFFF;
  /* Green, amber and red mean good, close and needs work. Nothing else. */
  --good: #1E7B46;
  --close: #A15C00;
  --bad: #C2362B;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* The logo, one size on every page, in the site and the app.
     Header at desktop width: */
  --logo-mark: 38px;
  --logo-name-size: 23px;
  --logo-name-weight: 700;
  --logo-gap: 10px;
  /* Header at phone width (760px and under): */
  --logo-mark-phone: 30px;
  --logo-name-size-phone: 16px;
  --logo-gap-phone: 10px;
  /* Footers and emails: the name alone, no mark, smaller on purpose. */
  --logo-foot-name-size: 18px;
  --logo-foot-name-weight: 700;
}

/* ---------- Page */
/* Boxes size as the designs do (content-box); the few that need border-box say so. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }

a { color: var(--accent-ink); }
a:not([class]):hover, .link:hover { color: var(--accent-deep); }
.link { color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus { outline: none; }

/* ---------- Motion */
@keyframes a-rise { from { transform: translateY(10px); } to { transform: none; } }
@keyframes a-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .45; } }
.a-rise { animation: a-rise .6s ease both; }
.a-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: a-pulse 2.4s ease-in-out infinite; }
.d-06 { animation-delay: .06s; } .d-08 { animation-delay: .08s; } .d-10 { animation-delay: .1s; }
.d-12 { animation-delay: .12s; } .d-16 { animation-delay: .16s; } .d-20 { animation-delay: .2s; }
.d-24 { animation-delay: .24s; } .d-30 { animation-delay: .3s; } .d-35 { animation-delay: .35s; }
.d-40 { animation-delay: .4s; } .d-50 { animation-delay: .5s; }
/* Motion below the fold waits until a person can see it (static/js/motion.js).
   An element marked data-motion, and everything in it, rests on its finished state until
   the script marks it, which is also what shows with scripts off: */
[data-motion]:not(.m-armed):not(.m-seen), [data-motion]:not(.m-armed):not(.m-seen) * { animation-name: none !important; }
/* Armed (out of view when the script started): the motion is set but held on its first
   frame, and plays on from that frame once it is in view (m-seen). */
[data-motion].m-armed:not(.m-seen), [data-motion].m-armed:not(.m-seen) * { animation-play-state: paused !important; }
/* A loop that has started pauses while it is off screen (no m-in).
   Important, so these hold over the hero stage's more specific per-tile rules. */
[data-motion="loop"].m-seen:not(.m-in), [data-motion="loop"].m-seen:not(.m-in) * { animation-play-state: paused !important; }

/* ---------- Header */
.s-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; }
.s-logo { display: flex; align-items: center; gap: var(--logo-gap); min-height: 44px; color: var(--ink); text-decoration: none; }
.s-mark { width: var(--logo-mark); height: var(--logo-mark); }
.s-name { font-family: var(--font-head); font-weight: var(--logo-name-weight); font-size: var(--logo-name-size); letter-spacing: -0.02em; white-space: nowrap; }
.s-nav { display: flex; align-items: center; gap: 4px; }
.s-nav a { padding: 12px 14px; color: var(--ink); text-decoration: none; font-size: 15px; }
.s-nav a[aria-current] { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.s-link { transition: color .15s ease; }
.s-link:hover { color: var(--accent-ink) !important; }
.s-actions { display: flex; align-items: center; gap: 8px; }
.s-login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.s-trial {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; background: var(--accent); color: var(--white); text-decoration: none;
  font-weight: 500; font-size: 15px; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.s-trial:hover { color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(75,77,237,.28); }
.s-short { display: none; }
.s-mob {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white);
}
.s-mob .s-mob-close, .s-mob[aria-expanded="true"] .s-mob-open { display: none; }
.s-mob[aria-expanded="true"] .s-mob-close { display: inline; }

/* ---------- Phone menu */
.s-menu { display: flex; flex-direction: column; padding: 0 16px 16px; border-bottom: 1px solid var(--line); }
.s-menu a { display: flex; align-items: center; min-height: 48px; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font-size: 17px; }
.s-menu a[aria-current] { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.s-menu .s-menu-trial { justify-content: center; margin-top: 8px; border-top: 0; border-radius: 999px; background: var(--accent); color: var(--white); font-weight: 500; }

/* ---------- Footer */
.f { border-top: 1px solid var(--line); }
.f-grid {
  max-width: 1120px; margin: 0 auto; padding: 48px 24px 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 28px;
}
.f-brand { display: flex; flex-direction: column; gap: 10px; }
.f-name { font-family: var(--font-head); font-weight: var(--logo-foot-name-weight); font-size: var(--logo-foot-name-size); }
.f-tag { font-size: 14px; color: var(--muted); }
.f-col { display: flex; flex-direction: column; gap: 2px; }
.f-head { padding-bottom: 6px; font-size: 13px; font-weight: 600; }
.f-col a { display: flex; align-items: center; min-height: 36px; color: var(--muted); text-decoration: none; font-size: 14px; }
.f-col a[aria-current] { color: var(--ink); font-weight: 500; }
.f-base {
  max-width: 1120px; margin: 0 auto; padding: 16px 24px 28px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted);
}

/* ---------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--white); text-decoration: none;
  font-weight: 500; font-size: 16px; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(75,77,237,.28); }
.btn-md { min-height: 48px; padding: 0 24px; font-size: 15px; }
.btn-ghost { padding: 0 26px; border: 1px solid var(--line-mid); background: transparent; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); box-shadow: none; }
.btn-ghost-sm {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-mid); border-radius: 999px; background: var(--white); color: var(--ink);
  font-weight: 500; font-size: 15px; transition: border-color .15s ease, transform .15s ease;
}
.btn-ghost-sm:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- Closing call to action */
.cta { border-top: 1px solid var(--line); }
.cta-in { max-width: 1120px; margin: 0 auto; padding: 80px 24px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.cta-h { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.cta-lead { margin: 0; max-width: 540px; color: var(--muted); font-size: 17px; }
.cta-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Blog parts, shared by the blog and its posts */
.cat { display: inline-flex; align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.b-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--white); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.b-card:hover { border-color: var(--line-mid); box-shadow: 0 10px 28px rgba(27,28,34,.06); transform: translateY(-2px); }
.b-card:focus-within { border-color: var(--accent); }
.b-stretch { color: var(--ink); text-decoration: none; }
.b-stretch:hover { color: var(--ink); }
.b-stretch::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.b-stretch:focus-visible { outline: none; }
.b-art { display: flex; align-items: center; justify-content: center; height: 150px; background: var(--tint); border-bottom: 1px solid var(--line-soft); }
.b-art svg { max-width: 100%; }
.b-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.b-title { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.b-sum { margin: 0; font-size: 15px; color: var(--muted); }
.b-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b-meta { margin: auto 0 0; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; color: var(--muted); }
.by { color: var(--ink); font-weight: 500; }
.b-card-sm .b-art { height: 140px; }
.b-card-sm .b-title { font-size: 20px; }
.b-field:focus-within { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(75,77,237,.14); }

/* ---------- Newsletter band */
.nl { border-top: 1px solid var(--line); background: var(--tint); }
.nl-in { max-width: 1120px; margin: 0 auto; padding: 56px 24px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px 48px; }
.nl-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; }
.nl-h { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.nl-lead { margin: 0; max-width: 440px; color: var(--muted); }
.nl-form { flex: 1 1 380px; display: flex; flex-direction: column; gap: 8px; }
.nl-label { font-size: 14px; font-weight: 500; }
.nl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-field { flex: 1 1 220px; display: flex; align-items: center; min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white); }
.nl-field input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); }
.nl-field input::placeholder { color: var(--muted); opacity: 1; }
.nl-form.is-bad .nl-field { border-color: var(--bad); }
.nl-btn { flex: 0 0 auto; }
.nl-msg { margin: 0; min-height: 22px; font-size: 14px; color: var(--muted); }
.nl-form.is-bad .nl-msg { color: var(--bad); }
.nl-form.is-done .nl-msg { color: var(--ink); }

/* ---------- Phones */
@media (max-width: 760px) {
  .s-desk { display: none !important; }
  .s-mob { display: inline-flex; }
  .s-head { padding: 12px 16px; }
  /* 44px tall so the button is an easy tap target. */
  .s-trial { padding: 0 14px; font-size: 14px; }
  .s-long { display: none; }
  .s-short { display: inline; }
  .s-logo { gap: var(--logo-gap-phone); }
  .s-name { font-size: var(--logo-name-size-phone); }
  .s-mark { width: var(--logo-mark-phone); height: var(--logo-mark-phone); }
  .f-col a { min-height: 44px; }
  .b-pad { padding-left: 16px !important; padding-right: 16px !important; }
}

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