/* funnelbeat.co — the public page and the legal pages.
   Tokens are the app's (web/app/ui.css, Mixpanel light); the face is the app's Hanken Grotesk,
   self-hosted. Nothing on this site loads from a third party. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/HankenGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #ffffff;
  --raised: #f6f6f6;
  --ink: #2a2a2f;
  --ink-2: #4a4a4f;
  --ink-secondary: #636367;
  --divider: #e9e9e9;
  --violet: #4e44e0;
  --violet-ink: #5146e1;
  --violet-hover: #4239c9;
  --violet-tint: #eeedfc;
  --focus: #d9d6fb;

  --gutter: 16px;
  --measure: 40rem;
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 720px) {
  :root { --gutter: 40px; }
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--violet-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--violet-hover); text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  background: var(--page);
  padding: 6px 10px;
  z-index: 10;
}

/* ---------- Top bar ---------------------------------------------------------------- */

.top {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top .brand { display: inline-flex; line-height: 0; }
.top .brand:focus-visible { border-radius: 8px; }
.top .brand img { height: 32px; width: auto; }
.legal .top .brand img { height: 26px; }

/* ---------- Language switch -------------------------------------------------------- */

.lang {
  display: flex;
  gap: 14px;
  font-size: 14px;
  line-height: 1;
}
.lang a {
  color: var(--ink-secondary);
  text-decoration: none;
  padding: 6px 0;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--violet);
}

/* ---------- Home ------------------------------------------------------------------- */

.home main { flex: 1; display: flex; }

.hero {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 48px;
  padding-top: 24px;
  padding-bottom: 72px;
}

.pitch { min-width: 0; }

.pitch h1 {
  margin: 0;
  font-size: clamp(2.25rem, 1.35rem + 3.6vw, 4.5rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--ink);
  max-width: 11.5em;
  text-wrap: balance;
}

.pitch .what {
  margin: 28px 0 0;
  max-width: 30em;
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* The mark's own geometry at poster size: two bars narrowing, then the beat. It is the
   page's one figure; it draws once on load and never moves again. */
.funnel {
  width: min(100%, 560px);
  height: auto;
  justify-self: start;
  overflow: visible;
}
.funnel rect, .funnel circle { fill: var(--violet); }
.funnel .b1, .funnel .b2 { transform-box: fill-box; transform-origin: left center; }
.funnel .beat { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .funnel .b1 { animation: draw 700ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both; }
  .funnel .b2 { animation: draw 700ms cubic-bezier(0.22, 1, 0.36, 1) 260ms both; }
  .funnel .beat { animation: beat 520ms cubic-bezier(0.34, 1.56, 0.64, 1) 780ms both; }
}
@keyframes draw { from { transform: scaleX(0.04); } to { transform: scaleX(1); } }
@keyframes beat {
  0% { transform: scale(0); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    align-items: center;
    gap: 64px;
  }
  .funnel { justify-self: end; }
}

@media (max-width: 719px) {
  .hero { gap: 40px; padding-bottom: 48px; }
  .funnel { width: 46%; order: -1; }
  .top .brand img { height: 28px; }
}

/* ---------- Footer ----------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--divider);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
.foot .wrap {
  padding-top: 22px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.foot .copy { margin: 0; }
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.foot ul a { color: var(--ink-secondary); text-decoration: none; }
.foot ul a:hover { color: var(--ink); text-decoration: underline; }
.foot ul a[aria-current="page"] { color: var(--ink); }
.foot .lang { margin-left: auto; }

@media (max-width: 719px) {
  .foot .lang { margin-left: 0; width: 100%; }
}

/* ---------- Legal pages ------------------------------------------------------------ */

.legal main { flex: 1; }
.legal .top { border-bottom: 1px solid var(--divider); }

.doc {
  max-width: var(--measure);
  padding-top: 48px;
  padding-bottom: 96px;
}
/* The legal texts (terms, privacy, data deletion) read in a wider column: 50rem of text plus the
   gutters. Only body.legal without .sms (the SMS pages carry "legal sms" and have no .doc anyway);
   the 404's .doc (body.lost) keeps --measure. */
body.legal:not(.sms) .doc { max-width: calc(50rem + 2 * var(--gutter)); }

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.doc .updated { margin: 0 0 2em; color: var(--ink-secondary); font-size: 15px; }
.doc h1 + p:not(.updated) { margin-top: 1.2em; }
.doc h2 {
  margin: 2.6em 0 0.6em;
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.012em;
  scroll-margin-top: 24px;
}
.doc h3 {
  margin: 2em 0 0.5em;
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 600;
  scroll-margin-top: 24px;
}
.doc h4, .doc h5, .doc h6 {
  margin: 1.6em 0 0.4em;
  font-size: 1rem;
  font-weight: 600;
}
.doc p, .doc ul, .doc ol, .doc blockquote, .doc .table { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: 0.3em 0; }
.doc li > ul, .doc li > ol { margin: 0.3em 0 0; }
.doc li::marker { color: var(--ink-secondary); }
.doc strong { font-weight: 600; }
.doc code {
  font-family: Menlo, ui-monospace, SFMono-Regular, monospace;
  font-size: 0.88em;
  background: var(--raised);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.doc hr { border: 0; border-top: 1px solid var(--divider); margin: 2.4em 0; }
.doc blockquote {
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--violet-tint);
  color: var(--ink-2);
}
.doc a { overflow-wrap: anywhere; }

.doc .table { overflow-x: auto; }
.doc table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.5;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--divider);
}
.doc th.right, .doc td.right { text-align: right; }
.doc th.center, .doc td.center { text-align: center; }
.doc th { font-weight: 600; border-bottom-color: #c7c6cc; }

.doc .draft {
  margin: 0 0 32px;
  padding: 12px 14px;
  background: #fdf3e3;
  border: 1px solid #f1d9ac;
  border-radius: 8px;
  color: #7a4d0b;
  font-size: 15px;
}

/* ---------- 404 -------------------------------------------------------------------- */

.lost main { flex: 1; display: flex; }
.lost .doc { align-self: center; padding-top: 24px; }
.lost .doc p { color: var(--ink-secondary); }
.lost .doc .second { margin-top: 40px; }

/* ---------- SMS opt-in form -------------------------------------------------------- */

.form {
  margin-top: 32px;
  display: grid;
  gap: 28px;
  max-width: 32rem;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}
.field input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--page);
  border: 1px solid #c7c6cc;
  border-radius: 8px;
}
.field input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--violet);
}
.form .hint { margin: 6px 0 0; font-size: 14px; color: var(--ink-secondary); }
.check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.check input {
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--violet);
}
.check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check label { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.form button {
  justify-self: start;
  height: 48px;
  padding: 0 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: var(--violet);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.form button:hover { background: var(--violet-hover); }
.form button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- SMS opt-in layout ----------------------------------------------------- */
/* Desktop: the pitch and an example text on the left, the form in a card on the right.
   Phone: pitch, form, then the example — the form is never pushed below a picture. */

.sms main { display: flex; }
.optin {
  flex: 1;
  display: grid;
  grid-template-areas: "intro" "card" "sample";
  gap: 32px;
  align-content: start;
  padding-top: 32px;
  padding-bottom: 56px;
}
.optin .intro { grid-area: intro; min-width: 0; }
.optin .card { grid-area: card; }
.optin .sample { grid-area: sample; }

.optin h1 {
  margin: 0;
  font-size: clamp(2.25rem, 1.35rem + 2.8vw, 3.75rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.optin .lead {
  margin: 20px 0 0;
  max-width: 28em;
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* The example text: one incoming message, the way a phone shows it. Labelled as an example. */
.sample { margin: 0; min-width: 0; }
.sample-label {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink-secondary);
}
.thread {
  max-width: 24rem;
  padding: 16px;
  background: var(--raised);
  border-radius: 16px;
}
.sender {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-secondary);
}
.sender img { width: 28px; height: 28px; border-radius: 7px; }
.sender b { font-weight: 600; color: var(--ink); }
.bubble {
  margin: 0;
  padding: 10px 14px;
  background: var(--page);
  border-radius: 18px 18px 18px 6px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(20, 20, 40, 0.05);
}

/* The form card */
.card {
  min-width: 0;
  padding: 24px 20px;
  background: var(--page);
  border: 1px solid var(--divider);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 20, 40, 0.04), 0 12px 32px rgba(20, 20, 40, 0.06);
}
.card .form { margin-top: 0; max-width: none; gap: 24px; }
/* The brand mark at the top of the opt-in card, above the first field (carriers read the sender here). */
.card-logo { display: block; width: auto; height: 32px; margin: 0 0 24px; }
.card .check {
  padding: 16px 16px 16px 14px;
  background: var(--raised);
  border-radius: 10px;
}
.card .check label { font-size: 14px; }
.card .form button { justify-self: stretch; }

@media (min-width: 960px) {
  .optin {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas: "intro card" "sample card";
    column-gap: 80px;
    row-gap: 48px;
    align-content: center;
    padding-top: 72px;
    padding-bottom: 96px;
  }
  .optin .card { align-self: start; padding: 32px; }
  .optin .sample { align-self: start; }
}

/* ---------- SMS thank-you ---------------------------------------------------------- */

.done {
  max-width: calc(36rem + 2 * var(--gutter));
  padding-top: 32px;
  padding-bottom: 56px;
}
.sms main:has(.done) { align-items: flex-start; }
.done .card { padding: 32px 20px; }
.done .tick { display: block; width: 48px; height: 48px; margin-bottom: 20px; }
.done .tick circle { fill: var(--violet); }
.done .tick path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.done h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.022em;
}
.done .lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.done .more {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
  font-size: 15px;
  color: var(--ink-secondary);
}

@media (min-width: 720px) {
  .done { padding-top: 72px; padding-bottom: 96px; }
  .done .card { padding: 40px; }
}
