/* BuonApp site v4 — sleek app-marketing style (Cal AI-inspired structure,
   BuonApp brand: green accent, honesty amber). Previous editorial design
   archived at archive/styles-v3-editorial.css. */

:root {
  --bg: #ffffff;
  --ink: #14170f;
  --ink-soft: #5c6156;
  --card: #f4f5f0;
  --card-deep: #ecefe6;
  --green: #1e8a3c;
  --green-deep: #166b2e;
  --amber: #b3701c;
  --rule: rgba(20, 23, 15, 0.12);
  --radius: 22px;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(68rem, 100% - 2.6rem); margin-inline: auto; }
img { max-width: 100%; height: auto; }
section[id] { scroll-margin-top: 5rem; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0;
}
header.site .wrap { display: flex; align-items: center; gap: 1.4rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.brand span { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 1.2rem; align-items: center; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; font-size: 0.9rem; font-weight: 600; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); }
.btn-dark {
  font-weight: 700; font-size: 0.9rem; text-decoration: none; white-space: nowrap;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 0.55em 1.2em;
}
.btn-dark:hover { background: #000; }

/* ---------- hero ---------- */
.hero { padding: 3.5rem 0 4rem; }
@media (min-width: 60rem) { .hero { padding: 5rem 0 6rem; } }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 60rem) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; } }
.chip {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.82rem; font-weight: 700; color: var(--green-deep);
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 999px; padding: 0.4em 1em; margin-bottom: 1.2rem;
}
h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.02;
  margin: 0 0 0.35em; text-wrap: balance;
}
h1 em { font-style: normal; color: var(--green); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 32em; margin: 0 0 1.6rem; }
.lede strong { color: var(--ink); }

.waitlist { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 30rem; }
.waitlist input[type="email"] {
  flex: 1 1 14rem; font: inherit; padding: 0.85em 1.1em;
  border: 1.5px solid var(--rule); border-radius: 14px; background: #fff; color: var(--ink);
}
.waitlist input[type="email"]:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.waitlist button {
  font: inherit; font-weight: 700; padding: 0.85em 1.5em; border: 0;
  border-radius: 14px; background: var(--ink); color: #fff; cursor: pointer;
}
.waitlist button:hover { background: #000; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.7rem; max-width: 34em; }

.phone-col { display: flex; justify-content: center; }
.phone {
  width: min(300px, 82vw); background: var(--ink); border-radius: 44px; padding: 11px;
  box-shadow: 0 24px 60px -24px rgba(20,23,15,0.45); transform: rotate(1deg); margin: 0;
}
.phone .screen { border-radius: 34px; overflow: hidden; background: #fff; }
.phone img { display: block; width: 100%; }

/* ---------- differentiator strip ---------- */
.diff { border-block: 1px solid var(--rule); background: var(--card); padding: 1.4rem 0; }
.diff ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.7rem 2.4rem; justify-content: center;
  font-size: 0.95rem; font-weight: 650; color: var(--ink);
}
.diff li { display: flex; align-items: baseline; gap: 0.5em; }
.diff li::before { content: "✓"; color: var(--green); font-weight: 800; }

/* ---------- sections ---------- */
.sec { padding: 4.5rem 0 1rem; }
.sec h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 800; letter-spacing: -0.025em;
  text-align: center; margin: 0 0 0.4em; text-wrap: balance;
}
.sec .sub { text-align: center; color: var(--ink-soft); max-width: 42em; margin: 0 auto 2.6rem; }

.cards { display: grid; gap: 1.3rem; }
@media (min-width: 44rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--card); border-radius: var(--radius); padding: 1.6rem 1.6rem 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.card h3 { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.01em; margin: 0 0 0.4em; }
.card p { color: var(--ink-soft); margin: 0 0 1.2rem; font-size: 0.97rem; }
.card .shotbox { margin-top: auto; display: flex; justify-content: center; }
.card .shotbox img {
  width: min(230px, 70%); border-radius: 18px 18px 0 0;
  border: 5px solid var(--ink); border-bottom: 0; display: block;
  box-shadow: 0 16px 40px -20px rgba(20,23,15,0.4);
}

.why { display: grid; gap: 1.3rem; padding-bottom: 3rem; }
@media (min-width: 54rem) { .why { grid-template-columns: repeat(3, 1fr); } }
.why-card { background: #fff; border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 1.6rem; }
.why-card .ico { font-size: 1.6rem; display: block; margin-bottom: 0.6rem; }
.why-card h3 { font-size: 1.15rem; font-weight: 750; margin: 0 0 0.4em; }
.why-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.ui-bit {
  display: inline-block; margin-top: 0.9rem; font-size: 0.82rem; font-weight: 600;
  background: var(--card-deep); border-radius: 999px; padding: 0.35em 0.9em; color: var(--ink);
}

/* ---------- honesty band ---------- */
.honesty-band {
  margin: 4.5rem 0 0; padding: 3.6rem 0; background: var(--ink); color: #f4f5f0;
  text-align: center;
}
.honesty-band .stat { font-size: clamp(3rem, 9vw, 5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #f2b25c; }
.honesty-band p { max-width: 44em; margin: 1rem auto 1.6rem; color: rgba(244,245,240,0.85); }
.honesty-band strong { color: #fff; }
.link-light {
  color: #f2b25c; font-weight: 700; text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
}
.link-light:hover { opacity: 0.85; }

/* ---------- final CTA ---------- */
.waitlist-final { text-align: center; padding: 5rem 0; }
.waitlist-final h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 0.3em; }
.waitlist-final .sub { color: var(--ink-soft); max-width: 36em; margin: 0 auto 1.8rem; }
.waitlist-final .waitlist { justify-content: center; margin-inline: auto; }
.trust-chips {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.8rem; justify-content: center;
  padding: 1.8rem 0 0; margin: 0; font-size: 0.88rem; color: var(--ink-soft);
}
.trust-chips li { display: flex; align-items: baseline; gap: 0.45em; }
.trust-chips li::before { content: "◆"; font-size: 0.55em; color: var(--green); }

/* ---------- footer ---------- */
footer.site-foot { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; align-items: baseline; }
.foot-brand { font-weight: 800; margin: 0; }
.foot-brand span { font-weight: 500; color: var(--ink-soft); }
.foot-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0.2rem 0 0; }
.foot-links { display: flex; gap: 1.6rem; font-size: 0.9rem; }
.foot-links a { color: var(--ink-soft); }
.foot-links a:hover { color: var(--ink); }

/* ---------- honesty page + legal page ---------- */
.page { max-width: 46rem; margin: 0 auto; padding: 3rem 0 4.5rem; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page h2 { font-size: 1.4rem; font-weight: 750; margin: 2em 0 0.5em; }
.page p, .page li { color: var(--ink-soft); }
.page strong { color: var(--ink); }
.page .big-stat { font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 800; color: var(--amber); letter-spacing: -0.03em; }
.page blockquote {
  margin: 1.4rem 0; padding: 1rem 1.3rem; background: var(--card);
  border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; color: var(--ink);
}
.page .shot-solo { display: flex; justify-content: center; margin: 2rem 0; }
.page .shot-solo img {
  width: min(260px, 80%); border-radius: 22px; border: 6px solid var(--ink);
  box-shadow: 0 20px 50px -22px rgba(20,23,15,0.45);
}
.menu-list { list-style: none; padding: 0; margin: 1rem 0; }
.menu-list li { display: flex; align-items: baseline; gap: 0.6em; padding: 0.4em 0; border-bottom: 1px dashed var(--rule); }
.menu-list .item { font-weight: 650; color: var(--ink); }
.menu-list .leader { flex: 1; }
.menu-list .answer { color: var(--ink-soft); font-size: 0.95rem; text-align: right; }

.legal { max-width: 46rem; margin: 0 auto; padding: 2.5rem 0 4rem; }
.legal h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 800; margin: 0 0 0.3em; }
.legal .effective { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 2rem; }
.legal h2 { font-size: 1.35rem; font-weight: 750; margin: 2.2em 0 0.5em; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.65; }
.legal strong { color: var(--ink); }
.legal a { color: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a { color: var(--green-deep); }

/* duo screenshots + integration chips inside cards (v4.1) */
.card .shotbox.duo { gap: 0.8rem; align-items: flex-end; }
.card .shotbox.duo img { width: min(160px, 44%); }
.mini-chips {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem;
  padding: 0; margin: 0 0 1.2rem;
}
.mini-chips li {
  font-size: 0.8rem; font-weight: 650; background: #fff;
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.3em 0.8em;
}

/* text-led cards (v4.2): mini-chips instead of screenshots for features
   that shipped ahead of their device captures */
.card.text-card { padding-bottom: 1.6rem; }
.card.text-card .mini-chips { margin-bottom: 0; }

/* ---------- how-it-works steps (v4.4 — one generous row per step,
   alternating sides, same scale as the cards section) ---------- */
.steps { display: grid; gap: 1.3rem; max-width: 58rem; margin-inline: auto; }
.step {
  background: var(--card); border-radius: var(--radius);
  padding: 2rem 2rem 0; overflow: hidden;
  display: grid; gap: 1.6rem; align-items: center;
}
@media (min-width: 44rem) {
  .step { grid-template-columns: 1.2fr 0.8fr; padding: 2.4rem 2.6rem 0; }
  .step:nth-child(even) .step-text { order: 2; }
  .step:nth-child(even) .step-shot { order: 1; }
}
.step-n {
  display: inline-grid; place-items: center; width: 2em; height: 2em;
  border-radius: 50%; background: var(--ink); color: #fff;
  font-weight: 800; font-size: 0.95rem; margin-bottom: 0.9rem;
}
.step h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 800; letter-spacing: -0.015em; margin: 0 0 0.45em; }
.step p { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6; margin: 0 0 1.6rem; max-width: 30em; }
.step-shot { display: flex; justify-content: center; align-self: end; }
.step img {
  width: min(250px, 88%); margin: 0; display: block;
  border-radius: 20px 20px 0 0; border: 6px solid var(--ink); border-bottom: 0;
  box-shadow: 0 18px 44px -20px rgba(20,23,15,0.4);
}

/* name fields (v4.5 — TestFlight invites need first/last + Apple ID email) */
.waitlist .name-row { display: flex; gap: 0.6rem; flex: 1 1 100%; }
.waitlist .name-row input {
  flex: 1 1 8rem; min-width: 0; font: inherit; padding: 0.85em 1.1em;
  border: 1.5px solid var(--rule); border-radius: 14px; background: #fff; color: var(--ink);
}
.waitlist .name-row input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.waitlist-final .waitlist { max-width: 30rem; }

/* v4.6 mobile fix: Chrome computes a wrapping flex form's min-content as if
   nowrap (email field + button side by side = 464px), and grid columns
   refuse to shrink below content min-width — so the hero column dragged the
   whole page wider than an iPhone. Let grid children shrink; items then
   wrap as designed. */
.hero .wrap > div { min-width: 0; }
.step > div { min-width: 0; }
.waitlist .name-row { min-width: 0; }
.waitlist input[type="email"] { min-width: 0; }

/* post-signup banner: shown only when the URL is /#thanks (form _next) */
.thanks-banner { display: none; }
.thanks-banner:target {
  display: block;
  background: var(--green); color: #fff; font-weight: 650;
  text-align: center; padding: 0.9rem 1.2rem;
}

/* v4.7 phone header: logo + button don't leave room for the nav on a 375px
   screen (it collapsed to a 40px sliver). Below 44rem the nav takes its own
   full-width row under them. */
@media (max-width: 44rem) {
  header.site .wrap { flex-wrap: wrap; row-gap: 0.35rem; }
  header.site .brand { margin-right: auto; }
  .site-nav {
    order: 3; flex: 1 1 100%;
    gap: 1rem; font-size: 0.85rem;
    padding-bottom: 0.15rem;
  }
}
