/* Baobao AI */

@font-face {
  font-family: "Quicksand";
  src: url("fonts/quicksand-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Zen Maru Gothic";
  src: url("fonts/zenmaru-bao.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+5B9D;
}

:root {
  --peach: #FFF3EC;
  --lilac: #F3EEFF;
  --peach-shape: #FFD9C7;
  --lilac-shape: #DCD0FF;
  --violet: #6F4EF2;
  --violet-deep: #5B3AE0;
  --violet-soft: #EDE7FF;
  --ink: #2A2540;
  --ink-2: #575070;
  --paper: #FFFFFF;
  --line: #E1D9F5;
  --error: #B3261E;
  --on-violet-2: #F0ECFF;
  --warn-on-violet: #FFE1D6;
  --shade: 42 37 64;

  --round: "Quicksand", "Arial Rounded MT Bold", "Varela Round", system-ui, sans-serif;
  --han: "Zen Maru Gothic", "PingFang SC", "Microsoft YaHei", sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2rem);
  --band: clamp(4rem, 8vw, 7rem);
  --out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  scrollbar-color: var(--lilac-shape) var(--paper);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1.125rem/1.6 var(--round);
  overflow-x: clip;
}
h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: var(--violet); color: var(--paper); }
:focus-visible { outline: 3px solid var(--focus, var(--violet-deep)); outline-offset: 3px; border-radius: .5rem; }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -200vw; width: 1px; height: 1px; opacity: 0; }
.skip {
  position: absolute; left: 1rem; top: -5rem; z-index: 20;
  padding: .75rem 1.25rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 700;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - var(--gutter) * 2, 72.5rem); margin-inline: auto; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .2em; }
b { font-weight: 700; }
.han { font-family: var(--han); font-weight: 700; }

/* ---------- type ---------- */
h1 {
  font-weight: 700; font-size: clamp(2.5rem, 3.6vw + 1.1rem, 3.875rem); line-height: 1.08;
  letter-spacing: -.02em; text-wrap: balance;
}
h2 {
  font-weight: 700; font-size: clamp(1.875rem, 2vw + 1.25rem, 2.75rem); line-height: 1.12;
  letter-spacing: -.015em; text-wrap: balance;
}
h3 { font-weight: 700; font-size: 1.375rem; line-height: 1.3; }
.lede {
  margin-top: 1.25rem; max-width: 33rem;
  font-size: clamp(1.125rem, .4vw + 1.0625rem, 1.25rem); line-height: 1.55;
  color: var(--ink-2); text-wrap: pretty;
}
.sub {
  margin-top: .75rem; max-width: 36rem;
  font-size: clamp(1.125rem, .4vw + 1.0625rem, 1.25rem); line-height: 1.5;
  color: var(--ink-2); text-wrap: pretty;
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--peach), var(--lilac));
  border-radius: 0 0 clamp(1.75rem, 4vw, 3rem) clamp(1.75rem, 4vw, 3rem);
  overflow: clip;
}
.nav { display: flex; align-items: center; gap: 1.75rem; padding-block: 1.5rem; }
.logo { font-weight: 700; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.01em; text-decoration: none; }
.nav-links { display: none; margin-left: auto; gap: 1.75rem; }
.nav-links a { font-weight: 700; font-size: 1rem; text-decoration: none; padding-block: .5rem; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: .35em; }
.nav-pill {
  display: inline-grid; place-items: center; min-height: 2.75rem; margin-left: auto; padding: 0 1.25rem;
  border-radius: 999px; background: var(--paper); color: var(--violet-deep);
  font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--out), transform .2s var(--out);
}
.nav-pill:hover { background: var(--violet-soft); transform: translateY(-1px); }
.nav-pill:active { transform: none; }

.hero-grid {
  display: grid; gap: clamp(3rem, 6vw, 3.75rem); align-items: center;
  padding-block: clamp(1.25rem, 3.2vw, 2.75rem) clamp(3.5rem, 7vw, 5.5rem);
}

/* ---------- the email form ---------- */
.join { margin-top: 2rem; max-width: 32.5rem; }
.ask-label { display: block; margin-bottom: .5rem; font-weight: 700; font-size: 1rem; }
.capsule {
  display: grid; gap: .5rem; padding: .5rem;
  border-radius: 2rem; background: var(--paper);
  box-shadow: 0 .875rem 2rem rgb(var(--shade) / .1);
  transition: box-shadow .2s var(--out);
}
.capsule:focus-within { outline: 3px solid var(--focus, var(--violet-deep)); outline-offset: 3px; }
.capsule:has([aria-invalid="true"]) { box-shadow: inset 0 0 0 3px var(--error), 0 .875rem 2rem rgb(var(--shade) / .1); }
.field {
  width: 100%; min-width: 0; height: 3.25rem; padding: 0 1.25rem;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  font: 600 1.125rem/1 var(--round); caret-color: var(--violet);
}
.field::placeholder { color: var(--ink-2); opacity: 1; font-weight: 500; }
.field:focus-visible { outline: 0; }
.btn {
  display: inline-grid; place-items: center; min-height: 3.25rem; padding: 0 1.625rem;
  border: 0; border-radius: 999px; background: var(--violet); color: var(--paper);
  font: 700 1.0625rem/1.1 var(--round); white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s var(--out), transform .2s var(--out), box-shadow .2s var(--out);
}
.btn:hover { background: var(--violet-deep); transform: translateY(-1px); box-shadow: 0 .5rem 1rem rgb(var(--shade) / .22); }
.btn:active { transform: scale(.98); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 999px; }
.btn:disabled { cursor: progress; background: var(--ink-2); transform: none; box-shadow: none; }

.oops {
  display: flex; gap: .625rem; align-items: flex-start;
  margin-top: .875rem; color: var(--oops, var(--error)); font-weight: 700; line-height: 1.4;
}
.oops:empty { display: none; }
.oops::before {
  content: ""; flex: none; width: 1.375rem; height: 1.375rem; margin-top: .1rem;
  background: var(--oops-mark, url("img/alert.svg")) no-repeat 50% / contain;
}
.fine { margin-top: .875rem; font-size: 1rem; line-height: 1.45; color: var(--fine, var(--ink-2)); text-wrap: pretty; }
.oops:not(:empty) ~ .fine { display: none; }
.nojs { display: none; margin-top: .625rem; font-size: 1rem; font-weight: 700; color: var(--oops, var(--error)); }
html:not(.js) .nojs { display: block; }

.done { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.done[hidden] { display: none; }
.done-mark { width: 3rem; height: 3rem; }
.done-title { font-weight: 700; font-size: 1.625rem; line-height: 1.2; }
.done p + p { margin-top: .375rem; color: var(--fine, var(--ink-2)); }
.done b {
  display: inline-block; padding: .05em .6em; border-radius: 999px;
  background: var(--paper); color: var(--ink); overflow-wrap: anywhere;
}
.again {
  margin-top: .5rem; min-height: 2.75rem; padding: 0; border: 0; background: none; color: inherit;
  font: 700 1rem/1.2 var(--round); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em;
  cursor: pointer;
}
.again:hover { text-decoration-thickness: 3px; }

/* ---------- the example journal page ---------- */
.page-art { position: relative; justify-self: center; width: min(100%, 21.5rem); }
.blob { position: absolute; z-index: 0; border-radius: 50%; }
.blob-a { width: 15rem; height: 15rem; left: -5.5rem; top: 1rem; background: var(--peach-shape); }
.blob-b { width: 12rem; height: 12rem; right: -4.5rem; bottom: 2rem; background: var(--lilac-shape); }
.journal {
  position: relative; z-index: 1; padding: 1.5rem 1.625rem 1.375rem;
  border-radius: 2rem; background: var(--paper);
  box-shadow: 0 1.75rem 3.5rem rgb(var(--shade) / .16);
}
.tag {
  display: inline-block; padding: .25rem .875rem; border-radius: 999px;
  background: var(--violet-soft); color: var(--violet-deep);
  font-weight: 700; font-size: .9375rem; line-height: 1.4;
}
.days { margin-top: .5rem; }
.days li { padding-block: .875rem; border-bottom: 2px dashed var(--line); }
.days b { display: block; color: var(--violet-deep); font-size: .9375rem; line-height: 1.4; }
.days span { display: block; margin-top: .125rem; font-weight: 600; font-size: 1.0625rem; line-height: 1.4; }
.today span { min-height: 2.8em; }
.journal-note { margin-top: .875rem; font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }

@keyframes settle { from { opacity: 0; transform: translateY(.75rem); } }
@keyframes caret { 50%, 100% { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } 60% { transform: scale(1.12); } }

@media (prefers-reduced-motion: no-preference) {
  .js .days li { animation: settle .8s var(--out) backwards; }
  .js .days li:nth-child(2) { animation-delay: .12s; }
  .js .days li:nth-child(3) { animation-delay: .24s; }
  .js .days li:nth-child(4) { animation-delay: .36s; }
  .js .days li:nth-child(5) { animation-delay: .48s; }
  .is-typing [data-type]::after {
    content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px;
    vertical-align: -.18em; background: var(--violet); animation: caret .9s step-end 7 forwards;
  }
  .just-joined .done-mark { animation: pop .6s var(--out) backwards; }
}

/* ---------- how it will work ---------- */
.how { padding-block: var(--band); text-align: center; }
.how .sub, .how .plain { margin-inline: auto; }
.steps { display: grid; gap: 2.75rem; margin-top: clamp(2.5rem, 5vw, 3.75rem); }
.step-art { position: relative; width: 11rem; margin-inline: auto; }
.step-art svg { display: block; width: 100%; height: auto; }
.step-n {
  position: absolute; left: -.25rem; top: -.25rem; display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 1.125rem; line-height: 1;
  box-shadow: 0 0 0 .3125rem var(--paper);
}
.step h3 { margin-top: 1.5rem; }
.step p { max-width: 19rem; margin: .5rem auto 0; color: var(--ink-2); text-wrap: balance; }
.plain { max-width: 40rem; margin-top: clamp(2.75rem, 5vw, 3.75rem); text-wrap: pretty; }

/* ---------- panels ---------- */
.panel { border-radius: clamp(1.75rem, 4vw, 3rem); padding: clamp(2rem, 5vw, 4rem) clamp(1.375rem, 5vw, 4rem); }
.panel-soft { display: grid; gap: 2rem; background: var(--lilac); }
.asks-list { display: grid; gap: 1.25rem; }
.asks-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.tick { width: 2rem; height: 2rem; margin-top: -.0625rem; }
.asks-list p { max-width: 34rem; color: var(--ink-2); }
.asks-list b { color: var(--ink); }

/* ---------- questions ---------- */
.faq { padding-block: var(--band); }
.faq h2 { text-align: center; }
.qs { max-width: 46rem; margin: clamp(2rem, 4vw, 3rem) auto 0; border-top: 2px solid var(--line); }
.q { border-bottom: 2px solid var(--line); }
.q summary {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  min-height: 4.25rem; padding: .875rem .25rem; list-style: none; cursor: pointer;
  font-weight: 700; font-size: 1.1875rem; line-height: 1.35;
}
.q summary::-webkit-details-marker { display: none; }
.q summary:hover { color: var(--violet-deep); }
.plus { position: relative; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--violet-soft); transition: background-color .2s var(--out); }
.plus::before, .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: .875rem; height: .1875rem; margin: -.09375rem 0 0 -.4375rem;
  border-radius: 2px; background: var(--violet-deep); transition: transform .3s var(--out), background-color .2s var(--out);
}
.plus::after { transform: rotate(90deg); }
.q[open] .plus { background: var(--violet); }
.q[open] .plus::before, .q[open] .plus::after { background: var(--paper); }
.q[open] .plus::after { transform: rotate(0); }
.q > p { max-width: 62ch; padding: 0 3.5rem 1.5rem .25rem; color: var(--ink-2); }

/* ---------- close ---------- */
.panel-bold {
  --focus: #FFFFFF; --fine: var(--on-violet-2); --oops: var(--warn-on-violet); --oops-mark: url("img/alert-light.svg");
  background: var(--violet-deep); color: var(--paper); text-align: center;
}
.panel-bold .sub { margin-inline: auto; color: var(--on-violet-2); }
.panel-bold .join { margin: 2rem auto 0; text-align: left; }
.panel-bold .capsule { box-shadow: none; }
.panel-bold .capsule:has([aria-invalid="true"]) { box-shadow: inset 0 0 0 3px var(--error); }
.panel-bold .again:focus-visible { outline-color: var(--paper); }
.panel-bold .btn:focus-visible { outline-color: var(--ink); }
.panel-bold .done { width: fit-content; margin-inline: auto; }
.foot {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: center; justify-content: space-between;
  padding-block: 2rem 2.5rem; font-size: 1rem; font-weight: 600; color: var(--ink-2);
}
.foot .logo { font-size: 1.25rem; color: var(--ink); }
.foot a:hover { color: var(--violet-deep); }

/* ---------- wider screens ---------- */
@media (min-width: 34rem) {
  .capsule { grid-template-columns: 1fr auto; border-radius: 999px; }
}

@media (min-width: 48rem) {
  .nav-links { display: flex; }
  .nav-pill { margin-left: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .page-art { margin-right: 2rem; }
  .panel-soft { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 3rem; align-items: center; }
}

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