/* ───────────────────────────────────────────────────────────────────────────
   Lowkey — public site.
   One screen. A soft field of colour, and a conversation with the assistant that is
   the product demo: you pick what to say, the line does it, it comes back done.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --ink: #0F1114;
  --ink-2: #4B5058;
  --ink-3: #7E848D;
  --me: #1A85FF;                /* the person's bubbles: the blue everyone knows */
  --white: #FFFFFF;
  --sun: #FFDE59;              /* the one pop: your voice, and the tick */
  --ground: #F1EEEA;           /* pages without the field sit on this */

  /* the same stack Facebook uses on the web: SF on Apple, Roboto on Android, Segoe on Windows */
  --text: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: var(--text);

  --gutter: 18px;
  --bubble-r: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--ground); color: var(--ink);
  font-family: var(--text); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── The ground: a slow, soft field of colour ─────────────────────────────── */
.field {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(180deg, #F6F1EA 0%, #F1EEEA 55%, #E9EDF3 100%);
}
.wash {
  position: absolute; border-radius: 50%;
  width: var(--d); height: var(--d);
  background: radial-gradient(circle at 50% 50%, var(--c) 0%, transparent 68%);
  opacity: .9; mix-blend-mode: multiply;
  animation: sway var(--t) ease-in-out infinite alternate;
  will-change: transform;
}
.w1 { --c: #FFD3B8; --d: 78vmax; --t: 46s; left: -22vmax; top: -30vmax; }          /* peach, top left */
.w2 { --c: #FFF0B0; --d: 72vmax; --t: 58s; right: -26vmax; top: -6vmax; }           /* butter, top right */
.w3 { --c: #DDD6FF; --d: 70vmax; --t: 52s; left: -14vmax; bottom: -34vmax; }        /* lilac, bottom left */
.w4 { --c: #CDE6FF; --d: 64vmax; --t: 64s; right: -18vmax; bottom: -30vmax; }       /* sky, bottom right */
@keyframes sway {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6vmax, 4vmax) scale(1.08); }
}

/* ── The screen: everything fits in one viewport ──────────────────────────── */
.screen {
  position: relative; z-index: 1;
  height: 100dvh; min-height: 540px;          /* one screen; the thread clips, the page never grows */
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0 var(--gutter) calc(10px + env(safe-area-inset-bottom));
}

/* ── Pills ────────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}
.pill-ink { background: var(--ink); color: #fff; }
.pill-ink:hover { transform: translateY(-1px); }
.pill-soft { background: rgba(255,255,255,.62); color: var(--ink); font-weight: 600; font-size: 13.5px; min-height: 36px; padding: 0 14px; cursor: default; backdrop-filter: blur(8px); }

/* ── Top ──────────────────────────────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.03em; }
.mark-line { width: 34px; height: 14px; overflow: visible; }
.mark-line path { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.trust i { font-style: normal; font-weight: 500; color: var(--ink-2); }
.top-cta { display: none; }

/* ── Stage ────────────────────────────────────────────────────────────────── */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; min-width: 0; padding: 6px 0 10px; }
.say { display: none; }

/* ── The conversation ─────────────────────────────────────────────────────── */
.device {
  position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; gap: 10px;
  padding: 30px 14px 14px;
}
.sketch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sketch path { fill: none; stroke: rgba(15,17,20,.30); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#sketch-ear { stroke-width: 2; }
.thread {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 8px;
  padding: 30px 2px 4px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px);
          mask-image: linear-gradient(180deg, transparent 0, #000 28px);
}
.thread::-webkit-scrollbar { display: none; }
.msg {
  max-width: 84%; padding: 12px 16px; border-radius: var(--bubble-r);
  font-size: 17px; line-height: 1.3; letter-spacing: -.005em;
  animation: pop .32s cubic-bezier(.2, .9, .3, 1.15) both;
  transform-origin: bottom left;
}
.msg.them { align-self: flex-start; background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px rgba(15,17,20,.07), 0 1px 2px rgba(20,40,70,.06), 0 10px 26px -18px rgba(20,40,70,.35); }
.msg.me { align-self: flex-end; background: var(--me); color: #fff; transform-origin: bottom right; display: inline-flex; align-items: center; gap: 10px; }
/* Lowkey thinking: the line, small, never still */
.msg.typing { display: inline-flex; padding: 14px 16px; }
.wig { width: 30px; height: 14px; overflow: visible; display: block; }
.wig path { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.msg.sticker { width: min(150px, 46%); padding: 4px 10px 0; }
.draw { width: 108px; margin: 0 0 2px -6px; }
.msg.sticker .draw { width: 124px; margin: 0 -2px -2px -6px; }
.msg .txt { display: block; animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; } }
.msg b { font-weight: 700; }
.msg .ck-unused { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.92); } }

/* your voice: five bars that move while the line listens */
.wave { display: inline-flex; align-items: center; gap: 2.5px; height: 18px; flex: none; }
.wave i { display: block; width: 3px; border-radius: 2px; background: rgba(255,255,255,.92); height: var(--h, 8px); }
.wave.is-live i { animation: bar .7s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes bar { from { transform: scaleY(.45); } to { transform: scaleY(1.25); } }

/* the line, inside a bubble */
.agent { width: 100%; }
.agent-svg { display: block; width: 100%; height: auto; overflow: visible; }
.face { transition: opacity .34s ease .14s; }
.agent.is-drawing .face, .agent.is-working .face, .agent.is-done .face { opacity: 0; transition-delay: 0s; }
.dots circle { fill: var(--ink); transform-box: fill-box; transform-origin: center; animation: blink 5.2s ease-in-out infinite; }
.rest { fill: none; stroke: var(--ink); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.pict * { fill: none; stroke: var(--ink); stroke-width: .42; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 3; stroke-dashoffset: 1.02; }
.pict.is-draw * { transition: stroke-dashoffset 1.2s cubic-bezier(.4, 0, .2, 1); stroke-dashoffset: 0; }
.tick { fill: none; stroke: var(--sun); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 3; stroke-dashoffset: 1.02; filter: drop-shadow(0 1px 0 rgba(0,0,0,.18)); }
.tick.is-draw { transition: stroke-dashoffset .4s ease-out .1s; stroke-dashoffset: 0; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }

/* ── Ask: your email is the last thing you say ────────────────────────────── */
.ask { display: flex; gap: 8px; }
.ask input {
  flex: 1; width: 0; min-width: 0; min-height: 50px; padding: 0 18px;   /* width 0: never a minimum the row can't shrink past */
  background: rgba(255,255,255,.92); border: 1.5px solid transparent; border-radius: 999px;
  box-shadow: 0 1px 2px rgba(20,40,70,.06); appearance: none;
}
.ask input::placeholder { color: var(--ink-3); }
.ask input:focus { outline: 0; border-color: var(--ink); }
.ask .pill { min-height: 50px; padding: 0 20px; flex: none; }
.note { font-size: 12.5px; color: var(--ink-2); text-align: center; }
.note.is-ok { color: var(--ink); font-weight: 600; }

/* ── Foot ─────────────────────────────────────────────────────────────────── */
.foot { display: flex; justify-content: center; gap: 18px; padding: 10px 0 0; font-size: 12.5px; color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot nav { display: flex; gap: 18px; }

/* ── Wider than a phone: the field gets a statement, the thread moves right ── */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .screen { padding-bottom: 18px; }
  .top { height: 84px; }
  .trust { display: none; }
  .top-cta { display: inline-flex; }
  .stage { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: 48px; padding: 0 0 8px; }
  .say { display: grid; gap: 20px; align-self: end; padding-bottom: 6vh; }
  .big {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(60px, 7.6vw, 112px); line-height: .94; letter-spacing: -.04em;
    text-wrap: balance;
  }
  .verb { display: inline-block; transition: opacity .24s ease, transform .24s ease; }
  .verb.is-swap { opacity: 0; transform: translateY(10px); }
  .sub { font-size: 17.5px; line-height: 1.45; color: var(--ink-2); max-width: 40ch; }
  .device { width: min(430px, 100%); justify-self: end; height: min(700px, 82vh); padding: 34px 18px 18px; }
  .msg { font-size: 17.5px; }
  .draw { width: 118px; }
  .foot { justify-content: flex-end; }
}

/* ── Documents: privacy, terms, support, 404 ──────────────────────────────── */
.masthead { padding: 0 var(--gutter); }
.masthead-in { max-width: 760px; margin: 0 auto; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.masthead .mark { font-size: 24px; }
.mark-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.doc, .missing { width: min(760px, 100% - var(--gutter) * 2); margin: 12px auto 0; }
.doc { background: var(--white); border-radius: 26px; padding: 28px 24px 10px; box-shadow: 0 2px 4px rgba(20,40,70,.05), 0 24px 48px -28px rgba(20,40,70,.3); }
.doc-head { display: grid; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid #ECEEF1; }
.doc h1 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 6.6vw, 46px); letter-spacing: -.03em; line-height: 1.02; }
.stamp { font-size: 13px; color: var(--ink-3); }
.doc section { padding: 22px 0; border-bottom: 1px solid #ECEEF1; display: grid; gap: 10px; }
.doc section:last-of-type { border-bottom: 0; }
.doc h2 { font-family: var(--display); font-weight: 700; font-size: clamp(21px, 4.4vw, 26px); letter-spacing: -.02em; }
.doc h3 { font-size: 15.5px; font-weight: 700; margin-top: 3px; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.doc strong { color: var(--ink); font-weight: 700; }
.doc ul { display: grid; gap: 9px; }
.doc ul li { display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 12px; }
.doc ul li::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: var(--ink-3); margin-top: 10px; }
.doc a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.doc .summary { display: grid; gap: 10px; padding: 18px 0 0; }
.doc .summary li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-weight: 600; font-size: 17px; line-height: 1.35; color: var(--ink); }
.doc .summary li::before { display: none; }
.doc .summary svg { width: 18px; height: 18px; margin-top: 3px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.todo { background: #FFE9A6; color: #6B4E00; padding: 0 5px; border-radius: 4px; font-weight: 700; }
.missing { margin-top: 16vh; display: grid; gap: 14px; justify-items: start; }
.statement { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
.statement.sm { font-size: clamp(34px, 7vw, 52px); }
.pitch { font-size: 16px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.missing .pitch a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
body:has(.doc) .foot, body:has(.missing) .foot { width: min(760px, 100% - var(--gutter) * 2); margin: 30px auto 0; padding-bottom: 30px; justify-content: space-between; }

/* ── Small screens ────────────────────────────────────────────────────────── */
@media (max-width: 899px) {
  .trust i { display: none; }
  .mark { font-size: 23px; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .msg { font-size: 16px; padding: 10px 14px; }
  .thread { gap: 6px; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .wash, .dots circle, .wave.is-live i { animation: none; }
  .msg { animation: none; }
  .verb, .pill { transition: none; }
  .pict.is-draw *, .tick.is-draw { transition-duration: 1ms; }
}
