/* Shared building blocks for inner pages (loaded after styles.css). Page-specific styles live in /css/<page>.css */
.btn-outline { background: var(--white); color: var(--black); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--grey); }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.wrap-narrow { width: min(820px, 100% - 32px); margin: 0 auto; }
/* The customer stories header keeps its landing-page width and gap when used on inner pages */
.wrap.dhead { width: min(720px, 86vw); margin: 0 auto 40px; }
.section { padding: 112px 0; }
.section-sm { padding: 72px 0; }

/* Page hero: same soft white-to-grey wash as the landing hero, no hard edge */
/* White under the header, soft grey through the middle, back to white at the bottom: no hard edge into the next section */
.page-hero { padding: 80px 16px 88px; text-align: center; background: linear-gradient(180deg, var(--white) 0%, #FAFAFA 120px, var(--grey) 42%, var(--grey) 62%, var(--white) 100%); }
.page-hero .eyebrow { display: inline-block; margin-bottom: 16px; }
.page-hero h1 { font-size: 72px; line-height: 76px; font-weight: 800; letter-spacing: -0.04em; max-width: 900px; margin: 0 auto; }
.page-hero .lead { max-width: 640px; margin: 20px auto 0; }
.page-hero .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* Section heads */
.shead { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.shead .eyebrow { display: inline-block; margin-bottom: 14px; }
.shead .h2 { font-size: 48px; line-height: 52px; letter-spacing: -0.04em; }
.shead .lead { margin-top: 16px; }
.split-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 48px; }
.split-head .h2 { font-size: 48px; line-height: 52px; letter-spacing: -0.04em; max-width: 640px; }

/* Cards */
.card { background: var(--white); border-radius: var(--r-card); padding: 28px; }
.card-grey { background: var(--grey); border-radius: var(--r-card); padding: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* FAQ accordion + "ask your own question" (see /faq.js) */
/* FAQ: open list on white, thin dividers, hover state, smooth height animation (driven by /faq.js) */
.faq { display: flex; flex-direction: column; overflow-anchor: none; }
.faq-item { border-bottom: 1px solid #EBEBEF; background: none; border-radius: 0; }
.faq-item summary { list-style: none; cursor: pointer; padding: 24px 4px; font-size: 18px; line-height: 26px; font-weight: 700; display: flex; justify-content: space-between; gap: 24px; align-items: center; color: var(--black); transition: color .2s ease; }
.faq-item summary::-webkit-details-marker { display: none; }
/* Plus in a soft circle that fills on hover and turns into a × when open */
.faq-item summary::after { content: ""; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat, var(--grey);
  color: var(--body); transition: background-color .25s ease, color .25s ease, transform .35s var(--ease); }
.faq-item summary:hover::after { background-color: var(--lavender); color: var(--purple); }
.faq-item.is-open summary::after { transform: rotate(45deg); background-color: var(--lavender); color: var(--purple); }
.faq-item summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; border-radius: 8px; }
.faq-item .faq-a { padding: 0 56px 26px 4px; color: var(--body); font-size: 16px; line-height: 26px; }
.faq-item .faq-a > * + * { margin-top: 10px; }
.faq-ask { margin-top: 24px; background: var(--grey); border: 0; border-radius: 20px; padding: 28px; }
.faq-ask h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.faq-ask h3 .ico { width: 30px; height: 30px; border-radius: 9px; }
.faq-ask p.hint { color: var(--label); font-size: 14px; margin-top: 4px; }
.faq-ask form { display: flex; gap: 8px; margin-top: 16px; }
.faq-ask input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 1px solid transparent; padding: 0 16px; font: inherit; font-size: 15px; background: var(--white); }
.faq-ask input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--lavender); }
.faq-ask button[type="submit"] { height: 46px; }
.faq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.faq-chips button { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--white); color: var(--body); transition: background .2s; }
.faq-chips button:hover { background: var(--lavender); color: var(--purple); }
.faq-out { margin-top: 16px; }
.faq-answer { background: var(--white); border-radius: 14px; padding: 18px 20px; font-size: 15px; line-height: 24px; color: var(--black); animation: faqIn .4s var(--ease); }
.faq-answer a { color: var(--purple); font-weight: 600; }
.faq-answer a:hover { text-decoration: underline; }
.faq-answer .src { display: block; margin-top: 10px; font-size: 12px; color: var(--label); }
.faq-answer .typing { display: inline-flex; gap: 4px; }
.faq-answer .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--label); animation: blink 1s infinite; }
.faq-answer .typing i:nth-child(2) { animation-delay: .15s; } .faq-answer .typing i:nth-child(3) { animation-delay: .3s; }
.faq-helpful { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--label); }
.faq-helpful button { padding: 4px 10px; border-radius: 999px; background: var(--white); border: 1px solid var(--border); font-size: 13px; }
@keyframes faqIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* Bottom CTA band (shared) */
.cta-band { text-align: center; padding: 120px 16px; }
/* A content section running straight into the closing CTA: trim both paddings so the gap isn't doubled (was ~232px) */
.section:has(+ .cta-band) { padding-bottom: 64px; }
.section + .cta-band { padding-top: 72px; }
.cta-band .h2 { font-size: 48px; line-height: 52px; letter-spacing: -0.04em; max-width: 760px; margin: 0 auto; }
.cta-band .lead { margin: 16px auto 0; max-width: 560px; }
.cta-band .hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

@media (max-width: 960px) {
  /* Phones: 56px a side keeps sections clearly apart without screens of empty white between them */
  .section { padding: 56px 0; }
  .section-sm { padding: 48px 0; }
  .cta-band { padding: 72px 16px 56px; }
  .section:has(+ .cta-band) { padding-bottom: 40px; }
  .section + .cta-band { padding-top: 48px; }
  .page-hero { padding: 48px 16px 56px; }
  .page-hero h1 { font-size: 44px; line-height: 50px; }
  .shead .h2, .split-head .h2, .cta-band .h2 { font-size: 32px; line-height: 38px; }
  .split-head { flex-direction: column; align-items: flex-start; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .faq-ask form { flex-direction: column; }
  .faq-ask input { flex: none; height: 46px; }
  .faq-chips button { min-height: 40px; }
  .faq-ask button[type="submit"] { width: 100%; }
}
@media (min-width: 600px) and (max-width: 960px) { .grid-4 { grid-template-columns: 1fr 1fr; } }

/* ---------- Gradient hero (Calendly product-page style) ----------
   Add .hero-grad to a .page-hero (and optionally data-tone="cobalt|coral|purple|teal").
   One big rounded panel under the header, white type, colour glows that drift slowly. */
.page-hero.hero-grad {
  /* Brand-purple base for every tone; the tone only changes one accent glow */
  --g0: #5B3EC2; --g1: #7852D4; --g2: #4F73E8; --g3: #C4B1F6; --g4: #9CCBF3; --g5: #A88BEB; --acc: #4F73E8;
  position: relative; isolation: isolate; overflow: hidden; margin: 8px 16px 0; border-radius: 32px;
  padding: 104px 24px 112px; color: var(--white); background: var(--g0); }
.page-hero.hero-grad[data-tone="cobalt"] { --acc: #4F73E8; }
.page-hero.hero-grad[data-tone="coral"] { --acc: #E46FAE; }
.page-hero.hero-grad[data-tone="teal"] { --acc: #3FB8C9; }
/* Two glow layers drifting on different paths and speeds, so the colour visibly moves and mixes */
.page-hero.hero-grad::before, .page-hero.hero-grad::after, .grad-panel::before, .grad-panel::after { content: ""; position: absolute; inset: -70%; pointer-events: none; will-change: transform; }
.page-hero.hero-grad::before, .grad-panel::before { z-index: -2;
  background:
    radial-gradient(30% 34% at 26% 30%, var(--g2), transparent 70%),
    radial-gradient(28% 36% at 74% 26%, var(--g5), transparent 70%),
    radial-gradient(34% 30% at 52% 86%, var(--g4), transparent 72%),
    linear-gradient(160deg, var(--g0) 10%, var(--g1) 55%, #8E73E2 90%);
  animation: heroDriftA 16s ease-in-out infinite alternate; }
.page-hero.hero-grad::after, .grad-panel::after { z-index: -1; opacity: .9;
  background:
    radial-gradient(22% 28% at 18% 78%, var(--g3), transparent 70%),
    radial-gradient(24% 28% at 84% 70%, var(--g3), transparent 70%),
    radial-gradient(20% 24% at 60% 34%, var(--acc), transparent 72%);
  animation: heroDriftB 21s ease-in-out infinite alternate; }
@keyframes heroDriftA {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(7%, -5%, 0) rotate(10deg) scale(1.08); }
  100% { transform: translate3d(-6%, 5%, 0) rotate(-8deg) scale(1.04); } }
@keyframes heroDriftB {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1.05); }
  50% { transform: translate3d(-8%, 6%, 0) rotate(-12deg) scale(.96); }
  100% { transform: translate3d(6%, -4%, 0) rotate(9deg) scale(1.1); } }
.page-hero.hero-grad h1, .page-hero.hero-grad .eyebrow { color: var(--white); }
/* One weight lighter on the gradient (800 → 700), like Calendly's product heroes */
.page-hero.hero-grad h1 { font-weight: 700; }
.page-hero.hero-grad .badge { font-weight: 600; }
.page-hero.hero-grad .lead { color: rgba(255, 255, 255, .9); }
.page-hero.hero-grad .badge { color: var(--white); }
.page-hero.hero-grad .badge .ico { background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
/* Buttons on the gradient: white primary, clear outline secondary (purple would disappear on purple) */
.page-hero.hero-grad .btn-purple { background: var(--white); color: var(--black); }
.page-hero.hero-grad .btn-purple:hover { background: rgba(255, 255, 255, .88); }
.page-hero.hero-grad .btn-outline { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .7); }
.page-hero.hero-grad .btn-outline:hover { background: rgba(255, 255, 255, .12); }
.page-hero.hero-grad a:not(.btn) { color: var(--white); }
@media (max-width: 960px) {
  .page-hero.hero-grad { margin: 4px 8px 0; border-radius: 24px; padding: 64px 16px 72px; }
}
@media (prefers-reduced-motion: reduce) { .page-hero.hero-grad::before, .page-hero.hero-grad::after, .grad-panel::before, .grad-panel::after { animation: none; } }
/* Solution pages: the hero's product stage sits straight on the moving gradient (no second gradient box) */
.page-hero.hero-grad.sl-hero { padding-bottom: 56px; background: var(--g0); }
.page-hero.hero-grad .sl-stage { margin-top: 48px; min-height: 0; overflow: visible; }
.page-hero.hero-grad .sl-bg { display: none; }
/* Product UI inside the hero keeps its own dark text */
.page-hero.hero-grad .sl-stage-ui { color: var(--black); }
.page-hero.hero-grad .sl-stage-ui a:not(.btn) { color: inherit; }
.page-hero.hero-grad .sl-stage .bars i { background: rgba(255, 255, 255, .26); }
@media (max-width: 960px) { .page-hero.hero-grad.sl-hero { padding-bottom: 32px; } .page-hero.hero-grad .sl-stage { margin-top: 32px; } }

/* Moving purple gradient on any block (e.g. a product stage under a light hero).
   The block needs position: relative and overflow: hidden (set here). */
.grad-panel { --g0: #5B3EC2; --g1: #7852D4; --g2: #4F73E8; --g3: #C4B1F6; --g4: #9CCBF3; --g5: #A88BEB; --acc: #4F73E8;
  position: relative; isolation: isolate; overflow: hidden; background: var(--g0); }
.grad-panel[data-tone="coral"] { --acc: #E46FAE; }
.grad-panel[data-tone="teal"] { --acc: #3FB8C9; }
.sl-stage.grad-panel .sl-bg { display: none; }
.sl-stage.grad-panel .bars i { background: rgba(255, 255, 255, .26); }
.sl-stage.grad-panel { margin-top: 104px; }
@media (max-width: 960px) { .sl-stage.grad-panel { margin-top: 56px; } }
/* First question sits flush with the section heading (no divider above it) */
.faq-item:first-child summary { padding-top: 4px; }
/* Clicking a question toggles it; don't let double-clicks select the question text */
.faq-item summary { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
/* Character illustration above the heading in closing CTA bands */
.cta-band .cta-illus { display: block; width: 220px; height: auto; margin: 0 auto 24px; -webkit-user-select: none; user-select: none; }
@media (max-width: 960px) { .cta-band .cta-illus { width: 170px; } }
.faq-chips button:focus:not(:focus-visible) { outline: none; }
.faq-chips button:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
/* Gradient panels behind product mock-ups in feature rows */
.sl-vis.grad-panel { justify-content: center; }
