/* ============================================================================
   CHARLIE — v1
   Tokens and values taken verbatim from the design handoff.
   Brand direction: warm, calm, competent, human. A very good banker, not a bot.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens -- */
:root {
  /* surfaces */
  --cream:   #F7F2EA;
  --raised:  #FBF8F2;
  --surface: #FFFFFF;

  /* ink ramp */
  --ink:      #1F3128;
  --ink-soft: #2C3A32;
  --body:     #4A554E;
  --muted:    #7A837C;
  --muted-2:  #8A928B;
  --faint:    #9AA19A;

  /* accent */
  --amber: #B77B2B;

  /* chat */
  --green-tint:    #E7EDE3;   /* logo ground + user bubbles */
  --charlie-bubble:#F4F1EA;   /* Charlie bubbles on white cards */
  --check:         #3E7A4E;

  /* dark band */
  --dark-text:       #F3EFE6;
  --dark-text-muted: rgba(243, 239, 230, .78);

  /* borders */
  --bd-06: rgba(31, 49, 40, .06);
  --bd-07: rgba(31, 49, 40, .07);
  --bd-08: rgba(31, 49, 40, .08);
  --bd-10: rgba(31, 49, 40, .10);
  --bd-12: rgba(31, 49, 40, .12);
  --bd-22: rgba(31, 49, 40, .22);
  --bd-25: rgba(31, 49, 40, .25);

  /* type */
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:  'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* layout */
  --container: 1120px;
  --gutter: 24px;
  --section-y: clamp(56px, 8vw, 104px);

  /* shadows */
  --shadow-chat: 0 24px 60px rgba(31, 49, 40, .12);
  --shadow-cta:  0 8px 24px rgba(31, 49, 40, .18);
  --shadow-ui:   0 12px 32px rgba(31, 49, 40, .08);
  --shadow-pill: 0 6px 18px rgba(31, 49, 40, .06);
  --shadow-card: 0 12px 28px rgba(31, 49, 40, .10);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.lp-locked { overflow: hidden; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--amber); }

button { font-family: var(--sans); }
input { outline: none; font-family: var(--sans); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Restrained motion only, no typing theatrics, per the brand direction. */
@keyframes msgIn   { from { opacity: 0; transform: translateY(8px); }  to { opacity: 1; transform: none; } }
@keyframes cardIn  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ------------------------------------------------------------ primitives -- */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }

.band {
  background: var(--raised);
  border-top: 1px solid var(--bd-06); border-bottom: 1px solid var(--bd-06);
}

.eyebrow {
  font-weight: 600; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--amber);
}

.h1 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(38px, 5.4vw, 60px); line-height: 1.06;
  letter-spacing: -.015em; text-wrap: pretty;
}
.h2 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12;
  letter-spacing: -.01em; text-wrap: pretty;
}
.lede {
  margin: 0; font-size: 17px; line-height: 1.6;
  color: var(--body); text-wrap: pretty;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--cream);
  border: none; border-radius: 14px; cursor: pointer;
  font-weight: 600; transition: background .15s ease;
}
.btn:hover { background: #2A4235; }
.btn--nav { border-radius: 12px; padding: 11px 20px; font-size: 15px; }
.btn--lg  { padding: 16px 30px; font-size: 17px; box-shadow: var(--shadow-cta); }
.btn--xl  { padding: 17px 34px; font-size: 17px; box-shadow: var(--shadow-cta); }
.btn--flat { box-shadow: none; }

/* the Charlie logo: a speech bubble in ink with a "here now" amber dot.
   Pure CSS, no mascot. */
.logo {
  position: relative; flex: none; width: 34px; height: 34px;
  background: var(--ink); color: var(--cream);
  border-radius: 11px 11px 11px 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1;
}
.logo__c { transform: translateY(-1px); }
.logo::after {
  content: ''; position: absolute; top: -3px; right: -3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--amber); border: 2px solid var(--cream);
}
.logo--sm { width: 30px; height: 30px; font-size: 17px; border-radius: 10px 10px 10px 3px; }
.logo--sm::after { width: 10px; height: 10px; }

/* the avatar mark used inside conversations */
.mark {
  border-radius: 50%; background: var(--green-tint); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; color: var(--ink);
}
.mark--34 { width: 34px; height: 34px; font-size: 18px; }
.mark--30 { width: 30px; height: 30px; font-size: 15px; }
.mark--28 { width: 28px; height: 28px; font-size: 14px; }
.mark--26 { width: 26px; height: 26px; font-size: 13px; }

.wordmark { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.01em; }

/* -------------------------------------------------------------------- nav -- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--container); margin: 0 auto; padding: 22px var(--gutter);
}
.nav__brand { display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------------------------- hero -- */
.hero {
  max-width: var(--container); margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px, 6vw, 72px); align-items: center;
}
.hero__left { display: flex; flex-direction: column; gap: 24px; max-width: 560px; }
.hero__sub {
  margin: 0; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6;
  color: var(--body); max-width: 46ch; text-wrap: pretty;
}
.hero__cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero__caption { font-size: 14px; color: var(--muted); }
.hero__right { display: flex; justify-content: center; }

/* the hero chat card: the page's thesis, shown not described */
.card {
  width: min(420px, 100%); background: var(--surface);
  border: 1px solid var(--bd-08); border-radius: 22px;
  box-shadow: var(--shadow-chat); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.card__head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--bd-07);
}
.card__who { display: flex; flex-direction: column; }
.card__name { font-weight: 600; font-size: 14.5px; }
.card__role { font-size: 12px; color: var(--muted-2); }
.card__foot { font-size: 12px; color: var(--faint); text-align: center; padding-top: 4px; }

.bub { font-size: 15px; line-height: 1.5; padding: 12px 16px; }
.bub--user {
  max-width: 82%; background: var(--green-tint);
  border-radius: 16px 16px 4px 16px;
}
.bub--charlie {
  max-width: 88%; background: var(--charlie-bubble);
  border-radius: 16px 16px 16px 4px;
}
.row-end   { display: flex; justify-content: flex-end; }
.row-start { display: flex; justify-content: flex-start; }

/* staggered entrance, per the handoff */
.in-1 { animation: msgIn .5s .2s both; }
.in-2 { animation: msgIn .5s .7s both; }
.in-3 { animation: msgIn .5s 1.2s both; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border-radius: 999px; padding: 9px 16px;
  font-weight: 500; font-size: 14px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.chip--fill { background: var(--ink); color: var(--cream); border: none; }
.chip--fill:hover { background: #2A4235; }
.chip--out {
  background: transparent; color: var(--ink); border: 1px solid var(--bd-25);
}
.chip--out:hover { border-color: var(--ink); }

/* ---------------------------------------------------------- ask anything -- */
.ask {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(36px, 5vw, 64px); align-items: start;
}
.ask__left { display: flex; flex-direction: column; gap: 18px; max-width: 480px; }
.ask__right { display: flex; flex-direction: column; gap: 10px; }
.qchip {
  text-align: left; background: var(--surface);
  border: 1px solid var(--bd-12); border-radius: 14px;
  padding: 14px 18px; font-weight: 500; font-size: 15.5px;
  color: var(--ink); cursor: pointer;
  transition: border-color .15s ease;
}
.qchip:hover { border-color: var(--bd-25); }
.qchip[aria-expanded="true"] { border-color: var(--ink); }

.answer {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 8px; animation: msgIn .4s both;
}
.answer__bubble {
  background: var(--charlie-bubble); border-radius: 4px 16px 16px 16px;
  padding: 13px 16px; font-size: 15px; line-height: 1.55; color: var(--ink-soft);
}

/* ------------------------------------------------------- gets things done -- */
.numbered {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px; margin-bottom: clamp(32px, 4vw, 48px);
}
.ncard {
  background: var(--surface); border: 1px solid var(--bd-08);
  border-radius: 18px; padding: 26px;
  display: flex; flex-direction: column; gap: 10px;
}
.ncard__n { font-weight: 600; font-size: 14px; color: var(--amber); }
.ncard__t { margin: 0; font-weight: 600; font-size: 19px; }
.ncard__p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }

.moment {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.moment__left { width: min(460px, 100%); display: flex; flex-direction: column; gap: 12px; }
.moment__cta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  max-width: 440px;
}
.moment__h {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(24px, 2.6vw, 30px); line-height: 1.18;
  letter-spacing: -.01em; text-wrap: pretty;
}
.moment__p { margin: 0 0 6px; font-size: 16px; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.ui-card {
  background: var(--surface); border: 1px solid var(--bd-08);
  border-radius: 18px; box-shadow: var(--shadow-ui); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.ui-card__head { display: flex; align-items: center; gap: 9px; }
.ui-card__name { font-weight: 600; font-size: 14px; }
.ui-card__p { margin: 0; font-size: 15px; line-height: 1.5; }
.ui-list { display: flex; flex-direction: column; gap: 8px; }
.ui-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--raised); border-radius: 10px;
  padding: 10px 14px; font-size: 14.5px;
}
.ui-row__n {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  font-weight: 600; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.pill {
  align-self: flex-start; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--bd-08);
  border-radius: 999px; padding: 9px 18px;
  font-size: 14px; color: var(--body); box-shadow: var(--shadow-pill);
}
.pill__check { color: var(--check); font-weight: 700; }

/* ----------------------------------------------------------- relationship -- */
.four {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 3vw, 40px) clamp(24px, 3vw, 40px);
}
.four__item {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 2px solid var(--ink); padding-top: 16px;
}
.four__t { margin: 0; font-weight: 600; font-size: 17.5px; }
.four__p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }

/* ---------------------------------------------------------------- dark band */
.dark { background: var(--ink); color: var(--dark-text); }
.dark__inner {
  max-width: 760px; margin: 0 auto; padding: var(--section-y) var(--gutter);
  text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.dark .h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.dark__p {
  margin: 0; font-size: 17px; line-height: 1.65;
  color: var(--dark-text-muted); max-width: 54ch; text-wrap: pretty;
}

/* -------------------------------------------------------------- final CTA -- */
.final {
  max-width: 760px; margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter); text-align: center;
  display: flex; flex-direction: column; gap: 20px; align-items: center;
}
.final__h2 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(32px, 4.4vw, 50px); line-height: 1.1;
  letter-spacing: -.015em; text-wrap: pretty;
}

/* ----------------------------------------------------------------- footer -- */
.footer { border-top: 1px solid var(--bd-08); }
.footer__inner {
  max-width: var(--container); margin: 0 auto; padding: 28px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--muted);
}
.footer__brand { display: flex; align-items: center; gap: 9px; }
.footer__word { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--ink); }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* ================================================================== modal = */
/* Same survey modal as the other concepts. Charlie opens every step in a
   bubble, so it still reads as a conversation, but each answer is one tap. */
.scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(24, 33, 28, .5);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.scrim[hidden] { display: none; }

.modal {
  width: min(520px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--raised); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
  animation: cardIn .3s both;
}
.modal__head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--bd-08);
  background: var(--surface);
}
.modal__head .logo::after { border-color: var(--surface); }
.modal__who { display: flex; flex-direction: column; flex: 1; }
.modal__name { font-weight: 600; font-size: 15px; }
.modal__step { font-size: 12.5px; color: var(--muted-2); }
.modal__close {
  background: transparent; border: none; font-size: 24px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 4px 6px;
}
.modal__close:hover { color: var(--ink); }

.modal__body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }

.cbub { display: flex; gap: 10px; align-items: flex-start; animation: msgIn .3s both; }
.cbub__t {
  background: var(--surface); border: 1px solid var(--bd-07);
  border-radius: 4px 16px 16px 16px; padding: 13px 16px;
  font-size: 16px; line-height: 1.5; font-weight: 500;
}

.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  text-align: left; background: var(--surface);
  border: 1px solid var(--bd-22); border-radius: 14px;
  padding: 14px 18px; min-height: 44px;
  font-weight: 500; font-size: 15.5px; color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: var(--ink); }
.option[aria-pressed="true"] { border-color: var(--ink); background: var(--green-tint); }

.back-link {
  align-self: flex-start; background: none; border: none; padding: 2px 0;
  font-size: 14px; color: var(--muted); cursor: pointer;
}
.back-link:hover { color: var(--ink); }

.rec {
  background: var(--surface);
  border: 1px solid var(--bd-10); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-card); animation: cardIn .45s both;
}
.rec__eyebrow {
  font-weight: 600; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber);
}
.rec__h { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 22px; }
.rec__p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--body); }
.rec__btn {
  background: var(--ink); color: var(--cream); border: none;
  border-radius: 12px; padding: 14px 20px; min-height: 44px;
  font-weight: 600; font-size: 15.5px; cursor: pointer;
  transition: background .15s ease;
}
.rec__btn:hover { background: #2A4235; }

.email-row { display: flex; gap: 8px; }
.email-input {
  flex: 1; min-width: 0;
  border: 1px solid var(--bd-22); border-radius: 12px;
  padding: 13px 16px; font-size: 16px;
  background: var(--surface); color: var(--ink);
  transition: border-color .15s ease;
}
.email-input:focus { border-color: var(--ink); }
.email-send {
  background: var(--ink); color: var(--cream); border: none;
  border-radius: 12px; padding: 13px 20px; min-height: 44px;
  font-weight: 600; font-size: 15px; cursor: pointer;
}
.email-send:hover { background: #2A4235; }
.email-error { margin: -8px 0 0; font-size: 13px; color: #9A3B25; min-height: 1.1em; }
.modal__fine { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.is-busy { opacity: .6; pointer-events: none; }

/* -------------------------------------------------------------- responsive -- */
/* The clamp() scale and auto-fit grids carry the layout; these only tune the
   things that need a hand on a phone. Verified at 390px. */
@media (max-width: 560px) {
  .scrim { padding: 0; align-items: flex-end; }   /* bottom sheet on mobile */
  .modal { max-height: 94vh; border-radius: 22px 22px 0 0; }
  .hero__cta-row .btn { flex: 1 1 100%; }
  .moment__cta .btn { width: 100%; }
  .btn, .chip, .qchip { min-height: 44px; }
}
