/* BeyondMyBenefits — "warm civic trust" aesthetic
   Evergreen + parchment + amber · Fraunces display / Public Sans body */

:root {
  --bg: #f6f1e7; /* warm parchment */
  --bg-tint: #efe7d6; /* deeper parchment for bands */
  --card: #fffdf8; /* near-white warm card */
  --ink: #1f2d28; /* deep evergreen-charcoal text */
  --ink-soft: #51635c; /* muted body */
  --ink-faint: #7c8a83;
  --green: #1e5c4c; /* primary evergreen */
  --green-deep: #143f33;
  --green-tint: #e7efe9;
  --amber: #c2772b; /* warm accent */
  --amber-deep: #a3631f;
  --amber-tint: #f6e7d2;
  --line: #e6dcc7; /* warm hairline */
  --line-soft: #efe8d8;
  --good: #2c7a58;
  --good-tint: #e3f1e9;
  --warn: #9a6a1f;
  --shadow: 0 18px 50px -24px rgba(31, 60, 47, 0.45);
  --shadow-sm: 0 6px 20px -12px rgba(31, 60, 47, 0.35);
  --r: 18px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:
    "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(
      1100px 520px at 80% -8%,
      rgba(30, 92, 76, 0.1),
      transparent 60%
    ),
    radial-gradient(
      820px 460px at -10% 8%,
      rgba(194, 119, 43, 0.08),
      transparent 55%
    );
  background-attachment: fixed;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}
strong {
  font-weight: 700;
}
a {
  color: var(--green);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 241, 231, 0.86);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 21px;
  color: var(--ink);
}
.brand-mark {
  color: var(--amber);
  font-size: 18px;
}
.brand-name strong {
  color: var(--green);
  font-weight: 700;
}
.brand.small {
  font-size: 18px;
}
.nav-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.dot-sep {
  color: var(--ink-faint);
}

/* ---------- hero ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 22px 30px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-deep);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  color: var(--ink);
}
.hero h1 .hl {
  color: var(--green);
}
.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 20px 0 22px;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 0;
  margin: 0 0 20px;
}
.chips li {
  background: var(--green-tint);
  color: var(--green-deep);
  border: 1px solid #cfe0d4;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14.5px;
  font-weight: 600;
}
.hero-note {
  font-size: 14.5px;
  color: var(--ink-faint);
  max-width: 42ch;
  margin: 0;
}

/* ---------- chat card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.chat-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 560px;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  color: #f4efe2;
}
.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  flex: none;
}
.chat-head-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.chat-head-text strong {
  font-size: 16px;
}
.chat-head-text span {
  font-size: 12.5px;
  opacity: 0.82;
}
.secure {
  margin-left: auto;
  font-size: 16px;
  opacity: 0.9;
}
.rep-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.14);
  color: #f4efe2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.rep-btn:hover { background: rgba(255, 255, 255, 0.26); }

.chat {
  flex: 1;
  min-height: 300px;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    repeating-linear-gradient(
      180deg,
      rgba(31, 60, 47, 0.018) 0 1px,
      transparent 1px 26px
    );
}
.msg {
  max-width: 84%;
  padding: 11px 15px;
  border-radius: 16px;
  white-space: pre-wrap;
  font-size: 16.5px;
}
.msg.bot {
  background: var(--green-tint);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}
.msg.user {
  background: var(--green);
  color: #f4efe2;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}
.msg.rep {
  background: #28406b;
  color: #eef2f8;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  border-left: 3px solid #c2772b;
}
.msg.sys {
  align-self: center;
  background: transparent;
  color: var(--ink-faint);
  font-size: 13px;
  font-style: italic;
  padding: 4px 8px;
}

.input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  background: #fffdf8;
}
.btn {
  appearance: none;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--green);
  background: #fff;
  color: var(--green-deep);
  padding: 11px 17px;
  border-radius: 12px;
  transition:
    transform 0.06s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.btn:hover {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: translateY(1px);
}
.btn.call {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
  text-decoration: none;
  display: inline-block;
}
.btn.call:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
}
.input-area form {
  display: flex;
  gap: 9px;
  width: 100%;
}
.input-area input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 16.5px;
  font-family: var(--sans);
  background: #fff;
  color: var(--ink);
}
.input-area input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}
.input-area textarea {
  flex: 1 1 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--sans);
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 62px;
}
.input-area textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}
.btn.skip {
  border-color: var(--line);
  color: var(--ink-faint);
  font-weight: 500;
}
.btn.skip:hover {
  background: var(--bg-tint);
  color: var(--ink-soft);
}
.retry-note {
  width: 100%;
  color: var(--warn);
  font-size: 14.5px;
  margin-bottom: 2px;
}
.chat-foot {
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
  background: #fffdf8;
}

/* ---------- sections ---------- */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 22px;
}
.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--ink);
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  margin: 10px auto 34px;
  max-width: 48ch;
}

.steps {
  border-top: 1px solid var(--line);
}
.step-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: s;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.step-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--amber-tint);
  color: var(--amber-deep);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 14px;
}
.step h3 {
  font-size: 21px;
  margin-bottom: 7px;
  color: var(--ink);
}
.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.trust {
  background: var(--bg-tint);
  border-radius: 28px;
  max-width: 1180px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.trust-item {
  padding: 8px 10px;
}
.trust-ico {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}
.trust-item h3 {
  font-size: 19px;
  color: var(--green-deep);
  margin-bottom: 6px;
}
.trust-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18.5px;
  color: var(--ink);
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  color: var(--amber);
  font-size: 24px;
  font-family: var(--sans);
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "–";
}
.faq-item p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 16px;
}
.faq-cta {
  display: block;
  width: max-content;
  margin: 30px auto 0;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.faq-cta:hover {
  background: var(--green-deep);
}

/* ---------- footer ---------- */
.site-foot {
  background: var(--green-deep);
  color: #d8e2da;
  margin-top: 30px;
}
.foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 22px;
}
.site-foot .brand {
  color: #f4efe2;
  margin-bottom: 14px;
}
.site-foot .brand-name strong {
  color: #fff;
}
.site-foot .brand-mark {
  color: var(--amber);
}
.disclaimer {
  color: #b9c8bf;
  font-size: 13px;
  line-height: 1.6;
  max-width: 86ch;
  margin: 0 0 14px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 14px;
}
.foot-links a {
  color: #e7efe9;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
}
.foot-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.foot-meta {
  color: #8fa399;
  font-size: 12.5px;
  margin: 0;
}

/* ---------- demo drawer (not consumer-facing) ---------- */
.demo-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  background: var(--ink);
  color: #f4efe2;
  border: none;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0.85;
}
.demo-toggle:hover {
  opacity: 1;
}
.demo-panel {
  position: fixed;
  right: 14px;
  bottom: 58px;
  z-index: 40;
  width: 300px;
  max-width: calc(100vw - 28px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  font-size: 14px;
}
.demo-head {
  font-weight: 700;
  margin-bottom: 8px;
  font-family: var(--sans);
}
.demo-head span {
  font-weight: 400;
  color: var(--ink-faint);
  font-size: 11.5px;
  display: block;
}
.demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
}
.demo-row b {
  color: var(--ink-soft);
  font-weight: 600;
}
.demo-row code {
  background: var(--bg-tint);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12.5px;
}
.events {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
  min-height: 24px;
}
.ev {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.ev.status {
  background: var(--bg-tint);
  color: var(--ink-soft);
}
.ev.QualifiedLead {
  background: var(--good-tint);
  color: var(--good);
}
.ev.Retainer {
  background: var(--amber-tint);
  color: var(--amber-deep);
  border: 1px solid #ecd6b2;
}
.ev.IntakeStarted,
.ev.IntakeCompleted {
  background: var(--green-tint);
  color: var(--green-deep);
}
.ev.EscalatedToRep {
  background: #e9eef6;
  color: #28406b;
}
.ev.DQLinkSent {
  background: var(--green-tint);
  color: var(--green-deep);
}
.demo-restart {
  width: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--sans);
}
.demo-restart:hover {
  border-color: var(--green);
  color: var(--green);
}
.demo-note {
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.5;
  margin: 9px 0 0;
}

/* ---------- motion ----------
   Critical content is VISIBLE BY DEFAULT. The entrance animation is an
   enhancement applied only when motion is allowed — so the page can never
   render blank if the animation doesn't run. */
.reveal {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: var(--d, 0ms);
  }
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- embed mode (chat-only, for iframe widget) ---------- */
html.embed, html.embed body { background: transparent; margin: 0; }
html.embed .nav,
html.embed .hero-copy,
html.embed .section,
html.embed .site-foot,
html.embed .demo-toggle,
html.embed .demo-panel { display: none !important; }
html.embed .wrap { padding: 0; max-width: none; }
html.embed .hero { padding: 0; max-width: none; margin: 0; }
html.embed .hero-grid { grid-template-columns: 1fr; gap: 0; }
html.embed .chat-card { max-height: none; height: 100vh; border-radius: 0; border: none; box-shadow: none; }
html.embed .reveal { opacity: 1; transform: none; animation: none; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero {
    padding-top: 34px;
  }
  .lede {
    max-width: none;
  }
  .step-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px 18px;
  }
}
@media (max-width: 520px) {
  body {
    font-size: 17px;
  }
  .nav-trust {
    display: none;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .demo-panel {
    width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .btn {
    transition: none;
  }
}
