/* The marketing pages (PRD §13): mobile first, light theme, coral only for buttons, links, the logo and highlights.
   Colours, radii and the font come from tokens.css; buttons and cards from site.css. */

.marketing { background: var(--bg); }

.mk-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.mk-narrow { max-width: 820px; }

.skip-link { position: absolute; left: 8px; top: -48px; z-index: 10; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.skip-link:focus { top: 8px; }

/* Header */

.mk-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.mk-header-row { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mk-header .brand { font-size: 17px; }
.mk-nav { display: flex; align-items: center; gap: 4px; }
.mk-nav-link { display: none; padding: 10px 12px; color: var(--text); font-weight: 600; font-size: 15px; border-radius: var(--radius-sm); }
.mk-nav-link:hover { color: var(--brand-strong); text-decoration: none; }
.mk-nav-link[aria-current="page"] { color: var(--brand-strong); }
.mk-nav .btn-small { min-height: 44px; margin-left: 4px; }

/* Text */

.eyebrow { align-self: flex-start; display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--brand-tint); color: var(--text); font-size: 14px; font-weight: 600; }
.lead { font-size: 17px; color: var(--muted); }
.section { padding: 56px 0; }
.section-flush { padding-top: 0; }
.section-tint { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 12px; }
.section-lead { color: var(--muted); margin-bottom: 24px; }
.section-more { margin-top: 20px; font-weight: 600; }

/* Hero and the demo box */

.marketing .hero { padding: 40px 0 48px; text-align: left; display: block; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; flex-direction: column; gap: 16px; }
.marketing .hero h1 { font-size: clamp(32px, 7vw, 54px); line-height: 1.08; letter-spacing: -0.025em; max-width: 860px; }
.marketing .hero .lead { max-width: 680px; font-size: 18px; }

.demo { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; max-width: 760px; }
.demo-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.demo-label { font-weight: 700; font-size: 15px; }
.demo-row { display: flex; flex-direction: column; gap: 8px; }
.demo-row input, .demo-ask input {
  flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 12px 14px; font-size: 16px;
  background: var(--surface); border: 1px solid #A8A29E; border-radius: var(--radius-sm);
}
.demo-row input:focus-visible, .demo-ask input:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 0; border-color: var(--brand-strong); }
.demo-row .btn { min-height: 52px; font-size: 16px; }
.demo-hint { font-size: 14px; color: var(--muted); }
.demo-error { font-size: 14px; color: var(--danger); font-weight: 600; }
.demo-error:empty { display: none; }

.demo-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; }
.demo-panel[hidden], .demo-ask[hidden], .demo-end[hidden] { display: none; }
.demo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); }
.demo-title { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.demo-meta { font-size: 14px; color: var(--muted); }
.marketing .hero .demo p { max-width: none; }
.demo-progress { padding: 12px 16px; font-size: 15px; background: var(--brand-tint); }
.demo[data-state="failed"] .demo-progress { background: var(--danger-tint); color: var(--danger); }
.demo-log { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; background: var(--bg); }
.demo-log:empty { display: none; }
.demo-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.demo-msg-visitor { align-self: flex-end; background: var(--text); color: #FFFFFF; border-bottom-right-radius: 4px; }
.demo-msg-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.demo-msg-bot[aria-busy="true"]::after { content: "…"; color: var(--muted); }
.demo-msg-note { align-self: stretch; background: var(--info-tint); color: var(--info); font-size: 14px; }
.demo-sources { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; white-space: normal; }
.demo-sources a { text-decoration: underline; }
.demo-ask { display: flex; gap: 8px; padding: 12px 16px 16px; margin: 0; border-top: 1px solid var(--border); }
.demo-ask .btn { min-height: 52px; }
.demo-end { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 16px; border-top: 1px solid var(--border); background: var(--brand-tint); }

/* How it works */

.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.step h3 { font-size: 19px; }
.step p { color: var(--muted); }
.step-number { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-strong); font-weight: 700; }

/* Pricing */

.pricing { display: flex; flex-direction: column; gap: 20px; }
.billing-toggle { align-self: flex-start; display: inline-flex; gap: 0; margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.billing-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.billing-toggle label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--muted); }
.billing-toggle input:checked + label { background: var(--text); color: #FFFFFF; }
.billing-toggle input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.billing-toggle .save { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-tint); color: var(--text); }

.plan-grid { display: grid; gap: 16px; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-card); }
.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-card); }
.plan-tag { position: absolute; top: -13px; left: 24px; padding: 2px 10px; border-radius: 999px; background: var(--brand-tint); font-size: 13px; font-weight: 700; }
.plan-name { font-size: 20px; }
.plan-price { font-size: 16px; color: var(--muted); }
.plan-price strong { font-size: 38px; line-height: 1.1; color: var(--text); letter-spacing: -0.02em; }
.plan-note { font-size: 14px; color: var(--muted); }
.plan-features { margin: 6px 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.plan-features li { padding-left: 26px; position: relative; }
.plan-features li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 8px; border-left: 2.5px solid var(--brand-strong); border-bottom: 2.5px solid var(--brand-strong); transform: rotate(-45deg); }
.pricing-small { font-size: 14px; color: var(--muted); }

/* Monthly by default; the Annual radio swaps every price, note and button at once. */
.pricing .price-year { display: none; }
.pricing:has(#billing-year:checked) .price-year { display: revert; }
.pricing:has(#billing-year:checked) .btn.price-year { display: inline-flex; }
.pricing:has(#billing-year:checked) .price-month { display: none; }

.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.compare th, .compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th { font-size: 14px; color: var(--muted); }
.compare tbody th { font-weight: 600; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }

/* FAQ */

.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0; }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; min-height: 56px; font-weight: 600; font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-tint); color: var(--brand-strong); font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.marketing details[open] > summary { margin-bottom: 0; }
.faq-item p { padding: 0 18px 18px; color: var(--muted); }

/* Call to action band */

.cta-band { background: var(--text); color: #FFFFFF; padding: 56px 0; }
.cta-inner { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta-band h2 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; }
.cta-band p { color: #E7E5E4; max-width: 640px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-light { background: var(--brand-strong); color: #FFFFFF; }
.btn-light:hover { background: var(--brand-hover); color: #FFFFFF; }
.btn-outline-light { background: transparent; color: #FFFFFF; border-color: #A8A29E; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.cta-band :focus-visible { outline-color: #FFFFFF; }

/* Inner pages */

.page-hero { padding: 40px 0 32px; }
.page-hero h1 { font-size: clamp(32px, 6vw, 46px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }

.industry-grid { display: grid; gap: 32px; align-items: start; }
.question-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.question-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; font-weight: 600; }
.example-chat { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.example-chat figcaption { font-size: 14px; color: var(--muted); }
.example-window { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.example-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--brand-strong); color: #FFFFFF; font-weight: 700; }
.example-head svg path:first-child { fill: #FFFFFF; }
.example-head svg path:last-child { stroke: var(--brand-strong); }
.example-log { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.example-log li { max-width: 88%; padding: 10px 12px; border-radius: 14px; }
.example-visitor { align-self: flex-end; background: var(--text); color: #FFFFFF; border-bottom-right-radius: 4px; }
.example-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.example-source { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.point { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.point h3 { font-size: 18px; }
.point p { color: var(--muted); }
.code { margin: 0; padding: 16px; background: var(--text); color: #F8FAFC; border-radius: var(--radius-md); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }

.signup-grid { display: grid; gap: 32px; align-items: start; }
.signup-intro { display: flex; flex-direction: column; gap: 14px; }
.signup-intro h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.1; letter-spacing: -0.02em; }
.signup-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.signup-demo { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-tint); }
.signup-card { display: flex; flex-direction: column; gap: 18px; }
.signup-card h2 { font-size: 22px; }

.legal { padding-top: 40px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 14px; }
.legal h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.1; letter-spacing: -0.02em; }
.legal h2 { font-size: 22px; margin-top: 18px; }
.legal h3 { font-size: 17px; margin-top: 6px; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal-updated { color: var(--muted); font-size: 14px; }
.legal-draft { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warning-tint); color: var(--warning); border: 1px solid #FCD34D; }
.legal-list { margin: 0; display: grid; gap: 4px 16px; }
.legal-list dt { font-weight: 700; margin-top: 8px; }
.legal-list dd { margin: 0; color: var(--muted); }
.legal-table { min-width: 560px; }

/* Footer: room at the bottom so the chat button never covers a link. */

.mk-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 96px; }
.mk-footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
.mk-footer-brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.mk-footer-brand p { color: var(--muted); max-width: 340px; }
.mk-footer h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.mk-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mk-footer li a { display: inline-block; padding: 8px 0; color: var(--text); text-decoration: none; }
.mk-footer li a:hover { color: var(--brand-strong); text-decoration: underline; }
.mk-copyright { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* Wider screens */

@media (min-width: 640px) {
  .mk-wrap { padding: 0 24px; }
  .demo-row { flex-direction: row; }
  .mk-nav-link { display: inline-block; }
  .steps, .points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .mk-footer-brand { grid-column: auto; }
}

@media (min-width: 900px) {
  .marketing .hero { padding: 72px 0 80px; }
  .section { padding: 80px 0; }
  .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .industry-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .signup-grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; }
  .page-hero { padding: 64px 0 40px; }
}
