/* The Pitch Page. Mueller's own tokens (sites/muellerco: navy, gold, ivory; Playfair Display + Instrument Sans). Dark on
   purpose: it reads in a dim classroom, and the guest's ad (a light card) is the brightest thing on the screen. */
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }

:root {
  --navy-950: #070e1f; --navy: #0b1733; --navy-800: #13224a; --gold: #c7b084; --gold-deep: #a08350; --ivory: #fffdf8;
  --ink: #141d31; --cream: #faf8f4; --dim: rgba(255, 253, 248, .66); --faint: rgba(255, 253, 248, .38);
  --line: rgba(199, 176, 132, .22); --ok: #8fd19e;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--navy-950); color: var(--ivory); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* the light behind everything: two slow glows, nothing that costs a phone's battery */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 30% 35%, rgba(199, 176, 132, .13), transparent 60%),
    radial-gradient(45vmax 45vmax at 75% 70%, rgba(48, 78, 160, .22), transparent 62%);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(4vmax, -3vmax, 0) rotate(8deg); } }

#app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 20px calc(24px + var(--safe-b)); max-width: 560px; margin: 0 auto; }

.top { display: flex; align-items: center; justify-content: space-between; height: 64px; flex: none; }
.mark img { display: block; height: 16px; width: auto; opacity: .95; }
.net { font-size: 12px; letter-spacing: .02em; padding: 5px 10px; border-radius: 99px; background: rgba(255, 253, 248, .08); color: var(--dim); display: flex; align-items: center; gap: 7px; }
.net::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 1.1s ease-in-out infinite; }
.net[hidden] { display: none; }

/* ---------------------------------------------------------------- idle + listening */
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: 6vh; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 11vw, 52px); line-height: 1.05; margin: 0 0 14px; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .sub { color: var(--dim); font-size: 17px; max-width: 330px; margin: 0 auto; }
.hero { transition: opacity .35s var(--ease), transform .45s var(--ease); }

.captions { min-height: 0; max-height: 0; overflow: hidden; width: 100%; font-size: clamp(22px, 6.4vw, 28px); line-height: 1.32; font-weight: 500;
  letter-spacing: -.005em; transition: max-height .4s var(--ease), min-height .4s var(--ease); display: flex; flex-direction: column; justify-content: flex-end; }
.captions .ph { color: var(--faint); }
.captions .w { animation: wordIn .28s var(--ease) both; }
.captions .hint { display: block; font-size: 15px; color: var(--faint); font-weight: 400; margin-top: 12px; animation: wordIn .4s var(--ease) both; }

.orbwrap { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.orb { --lv: 0; position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; padding: 0;
  background: radial-gradient(circle at 50% 38%, #1b2d5c, var(--navy) 72%);
  box-shadow: 0 0 0 1.5px rgba(199, 176, 132, .6), 0 18px 50px rgba(0, 0, 0, .5), 0 0 calc(28px + var(--lv) * 70px) rgba(199, 176, 132, calc(.16 + var(--lv) * .5));
  transition: transform .35s var(--ease), box-shadow .12s linear; touch-action: manipulation; }
.orb:active { transform: scale(.96); }
.orb .ring, .orb .ring2 { position: absolute; inset: -16px; border-radius: 50%; border: 1px solid rgba(199, 176, 132, .28); pointer-events: none; }
.orb .ring { animation: breathe 3.4s ease-in-out infinite; }
.orb .ring2 { inset: -34px; border-color: rgba(199, 176, 132, .12); animation: breathe 3.4s ease-in-out .6s infinite; }
.orb svg { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; transition: opacity .2s, transform .3s var(--ease); }
.orb .stop { opacity: 0; transform: scale(.6); }
.orblabel { font-size: 15px; color: var(--dim); letter-spacing: .01em; min-height: 22px; }
.orblabel .t { color: var(--faint); font-variant-numeric: tabular-nums; margin-left: 6px; }
.linkbtn { background: none; border: 0; color: var(--faint); font-size: 14px; padding: 8px 12px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 253, 248, .25); }

[data-state="listening"] .hero, [data-state="heard"] .hero { opacity: 0; transform: translateY(-12px); position: absolute; pointer-events: none; }
[data-state="listening"] .captions, [data-state="heard"] .captions { max-height: 52vh; min-height: 30vh; }
[data-state="listening"] .orb { transform: scale(1.04); }
[data-state="listening"] .orb .ring { animation: none; transform: scale(calc(1 + var(--lv) * .35)); transition: transform .1s linear; border-color: rgba(199, 176, 132, .45); }
[data-state="listening"] .orb .ring2 { animation: none; transform: scale(calc(1 + var(--lv) * .6)); transition: transform .14s linear; }
[data-state="listening"] .orb .mic { opacity: 0; transform: scale(.6); }
[data-state="listening"] .orb .stop { opacity: 1; transform: scale(1); }
[data-state="listening"] .linkbtn, [data-state="heard"] .linkbtn { visibility: hidden; }
[data-state="heard"] .orb { box-shadow: 0 0 0 1.5px rgba(199, 176, 132, .3), 0 18px 50px rgba(0, 0, 0, .5); }
[data-state="heard"] .orb .ring { border: 2px solid transparent; border-top-color: var(--gold); border-right-color: rgba(199, 176, 132, .5); animation: spin 1s linear infinite; }
[data-state="heard"] .orb .ring2 { animation: none; opacity: .4; }
[data-state="building"] .stage, [data-state="done"] .stage { display: none; }

/* ---------------------------------------------------------------- the build */
.build { display: none; padding-top: 6px; padding-bottom: 120px; }
[data-state="building"] .build, [data-state="done"] .build { display: block; animation: rise .5s var(--ease) both; }
.lab { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.said blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: rgba(255, 253, 248, .86); }
.said { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.read { font-size: 20px; line-height: 1.38; font-weight: 500; margin: 0 0 18px; min-height: 1px; }

.steps { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.st { display: grid; grid-template-columns: 18px 1fr; column-gap: 12px; align-items: start; animation: rise .35s var(--ease) both; font-size: 15px; }
.st .dot { width: 18px; height: 18px; border-radius: 50%; margin-top: 2px; position: relative; border: 1.5px solid rgba(199, 176, 132, .5); }
.st.active .dot { border-color: transparent; border-top-color: var(--gold); border-right-color: var(--gold); animation: spin .8s linear infinite; }
.st.done .dot { background: var(--gold); border-color: var(--gold); }
.st.done .dot::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--navy-950); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.st .k { color: var(--dim); }
.st .v { display: block; color: var(--ivory); margin-top: 1px; }
.st .v:empty { display: none; }
.st .k .t { color: var(--faint); font-variant-numeric: tabular-nums; margin-left: 6px; }
.steps.folded { display: none; }
.howbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0 0 18px; color: var(--dim); font-size: 14px; }
.howbtn[hidden] { display: none; }
.howbtn span { color: var(--gold); transition: transform .25s var(--ease); }
.howbtn[aria-expanded="true"] span { transform: rotate(180deg); }
.pic .dev small { display: block; margin-top: 6px; font-size: 12px; color: rgba(255, 253, 248, .5); font-variant-numeric: tabular-nums; }

/* the ad: a light card, like a real post */
.ad { background: #fff; color: var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  margin: 0 auto 30px; max-width: clamp(300px, calc((100dvh - 362px) / 1.25), 440px); animation: rise .55s var(--ease) both; }
.ad[hidden] { display: none; }
.adhead { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 18px;
  color: var(--navy); background: linear-gradient(140deg, #e7d8b4, var(--gold) 55%, var(--gold-deep)); }
.brand { font-weight: 700; font-size: 15px; line-height: 1.2; min-height: 18px; }
.spons { font-size: 12px; color: #6b7280; line-height: 1.2; }
.primary { margin: 0; padding: 4px 14px 12px; font-size: 15px; line-height: 1.42; min-height: 22px; color: #1f2937; }
.pic { position: relative; aspect-ratio: 4 / 5; background: #0f1a36; overflow: hidden; }
.pic .dev { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: rgba(255, 253, 248, .78); font-size: 14px;
  background:
    radial-gradient(60% 50% at 30% 30%, rgba(199, 176, 132, .35), transparent 70%),
    radial-gradient(60% 60% at 70% 75%, rgba(70, 104, 190, .45), transparent 70%), #101c3c;
  background-size: 200% 200%; animation: develop 3.6s ease-in-out infinite alternate; transition: opacity .6s; }
.pic .dev span { max-width: 280px; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.pic .dev span::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%; border: 2px solid rgba(255, 253, 248, .25); border-top-color: var(--gold); animation: spin .9s linear infinite; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.07); filter: blur(16px) saturate(.7);
  transition: opacity .9s var(--ease), transform 1.4s var(--ease), filter 1.2s var(--ease); }
.pic.in img { opacity: 1; transform: none; filter: none; }
.pic.in .dev { opacity: 0; }
.adfoot { display: flex; align-items: center; gap: 12px; padding: 12px 14px 14px; background: #f6f7f9; }
.hl { flex: 1; font-weight: 700; font-size: 15px; line-height: 1.25; min-height: 19px; }
.cta { flex: none; font-size: 13px; font-weight: 600; padding: 9px 13px; border-radius: 8px; background: #e6e8ec; color: var(--ink); white-space: nowrap; }
.cta:empty { display: none; }
.skel { display: inline-block; height: .9em; border-radius: 4px; background: linear-gradient(90deg, #eceef2, #f7f8fa, #eceef2); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; vertical-align: middle; }

.refuse { border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin: 0 0 26px; font-size: 17px; line-height: 1.45; background: rgba(255, 253, 248, .04); }
.refuse[hidden] { display: none; }

.advice { display: flex; flex-direction: column; gap: 20px; margin-bottom: 26px; }
.blk[hidden] { display: none; }
.blk p { margin: 0; font-size: 16.5px; line-height: 1.55; color: rgba(255, 253, 248, .9); }
.blk .w { animation: wordIn .35s var(--ease) both; }
.blk.road p { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--ivory); }

.notes { font-size: 13px; color: var(--faint); margin-bottom: 18px; }
.notes p { margin: 0 0 4px; }
.yours { font-size: 14px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 14px; }
.yours[hidden] { display: none; }
.yours button { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.made { display: inline-block; font-size: 13px; color: var(--faint); text-decoration: none; border-bottom: 1px solid rgba(255, 253, 248, .18); padding-bottom: 1px; }
.phoneline { font-size: 14px; color: var(--dim); margin: 0 0 10px; }
.phoneline a { color: var(--gold); }

/* the action bar once the ad is ready */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 34px 20px calc(16px + var(--safe-b));
  background: linear-gradient(to top, var(--navy-950) 72%, rgba(7, 14, 31, 0)); display: flex; justify-content: center; }
.bar[hidden] { display: none; }
.bar .in { width: 100%; max-width: 520px; display: flex; gap: 10px; animation: rise .4s var(--ease) both; }
.btn { flex: 1; height: 52px; border-radius: 14px; border: 0; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.gold { background: linear-gradient(180deg, #d6c196, var(--gold)); color: var(--navy-950); box-shadow: 0 8px 24px rgba(199, 176, 132, .25); }
.btn.ghost { background: rgba(255, 253, 248, .07); color: var(--ivory); box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .16); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; }

/* sheets (type it, messages, text me) */
.sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(3, 7, 18, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s both; }
.sheet[hidden] { display: none; }
.sheet .pane { width: 100%; max-width: 560px; background: #0e1a38; border-radius: 22px 22px 0 0; padding: 22px 20px calc(20px + var(--safe-b));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); animation: up .35s var(--ease) both; }
.sheet h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0 0 6px; }
.sheet p { color: var(--dim); margin: 0 0 14px; }
.sheet textarea, .sheet input { width: 100%; font: inherit; font-size: 17px; color: var(--ivory); background: rgba(255, 253, 248, .06); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; outline: none; resize: none; }
.sheet textarea { min-height: 120px; }
.sheet textarea:focus, .sheet input:focus { border-color: var(--gold); }
.sheet .row { display: flex; gap: 10px; margin-top: 14px; }
.sheet .err { color: #f3b2a6; font-size: 14px; min-height: 20px; margin: 8px 0 0; }

.foot { flex: none; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--faint); padding-top: 18px; }
.foot a { text-decoration: none; border-bottom: 1px solid rgba(255, 253, 248, .18); }
[data-state="building"] .foot, [data-state="done"] .foot { display: none; }

.closed { flex: 1; display: grid; place-items: center; text-align: center; padding: 0 10px 10vh; }
.closed h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
.closed p { color: var(--dim); }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 20; background: var(--ivory); color: var(--navy-950);
  padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: rise .25s var(--ease) both; }

@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.07); opacity: .45; } }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes wordIn { from { opacity: 0; transform: translateY(5px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes develop { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (min-width: 700px) { #app { padding-top: 16px; } .hero h1 { font-size: 56px; } }
