/* RelayKin landing page. Layout: a split hero with a live-looking inbox,
   then alternating plain and tinted bands. Colours follow the brand mark;
   neutrals lean slightly green. System fonts only (the portal's CSP serves
   its own files, nothing from font hosts). */
:root {
  --bg: #f6f8f7; --card: #ffffff; --band: #ebf3ef; --text: #13211b; --muted: #556860; --line: #dbe5e0;
  --brand: #128c5e; --brand-dark: #0d6e4a; --brand-soft: rgba(18, 140, 94, .12); --mint: #a7f3d0;
  --in: #ffffff; --out: #dcf5e8; --bad: #b42318; --bad-soft: #fdecea;
  --wa: #128c5e; --tg: #2a8bd1; --sms: #7a5af0;
  --code-bg: #10201a; --code-text: #d7f5e6; --code-dim: #7fa594;
  --display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1513; --card: #151f1b; --band: #12201a; --text: #e5eee9; --muted: #93a79e; --line: #263530;
    --brand: #2fbf84; --brand-dark: #24a571; --brand-soft: rgba(47, 191, 132, .14);
    --in: #1b2722; --out: #173d2c; --bad: #ff8a80; --bad-soft: rgba(255, 138, 128, .14);
    --wa: #2fbf84; --tg: #5aaee8; --sms: #a08bff; --code-bg: #0a120f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1513; --card: #151f1b; --band: #12201a; --text: #e5eee9; --muted: #93a79e; --line: #263530;
  --brand: #2fbf84; --brand-dark: #24a571; --brand-soft: rgba(47, 191, 132, .14);
  --in: #1b2722; --out: #173d2c; --bad: #ff8a80; --bad-soft: rgba(255, 138, 128, .14);
  --wa: #2fbf84; --tg: #5aaee8; --sms: #a08bff; --code-bg: #0a120f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .typing span { animation: none !important; } }
body { margin: 0; font: 16px/1.6 var(--body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; letter-spacing: -.015em; }
code { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px var(--display); color: var(--text); text-decoration: none; }
.brand img { border-radius: 8px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.links a:hover { color: var(--text); }

/* Buttons */
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--card); }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { padding: 8px 14px; }
a:focus-visible, .btn:focus-visible, summary:focus-visible, .code:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 64px 48px; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); line-height: 1.05; margin: 0 0 20px; letter-spacing: -.03em; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.price-hint { margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.price-hint strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Inbox mock */
.mock { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px -24px rgba(10, 60, 40, .35); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-bar b { margin-left: 8px; font-weight: 600; color: var(--muted); }
.mock-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); min-height: 330px; }
.mock-list { list-style: none; margin: 0; padding: 6px; border-right: 1px solid var(--line); }
.mock-list li { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 10px; font-size: 13px; line-height: 1.3; }
.mock-list li.on { background: var(--brand-soft); }
.mock-list li div { min-width: 0; flex: 1; }
.mock-list b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-list small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--band); color: var(--muted); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.ch { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 5px; border-radius: 9px; font: 700 10px var(--body); font-style: normal; color: #fff; letter-spacing: .02em; }
.ch.wa { background: var(--wa); } .ch.tg { background: var(--tg); } .ch.sms { background: var(--sms); }
.mock-chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--band); font-size: 13.5px; line-height: 1.45; }
.msg { margin: 0; max-width: 88%; padding: 9px 12px; border-radius: 14px; }
.msg.in { background: var(--in); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--out); align-self: flex-end; border-bottom-right-radius: 4px; }
.by { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--brand); }
.typing { margin: auto 0 0; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .35; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; margin-right: 6px; }
@keyframes blink { 50% { opacity: 1; } }
.mock figcaption { padding: 8px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); text-align: right; }

/* Channels strip */
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding-block: 8px 24px; }
.channels div { padding: 18px 22px; border-left: 3px solid var(--line); }
.channels div:nth-child(1) { border-color: var(--wa); } .channels div:nth-child(2) { border-color: var(--tg); } .channels div:nth-child(3) { border-color: var(--sms); }
.channels b { display: block; font: 700 17px var(--display); }
.channels span { color: var(--muted); font-size: 15px; }

/* Sections */
.section { padding-block: 72px; }
.band { background: var(--band); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; margin: 0 0 10px; }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 32px; }
.features article { padding-top: 18px; border-top: 2px solid var(--brand); }
.features h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.3; }
.features p { margin: 0; color: var(--muted); font-size: 15px; }

/* AI flow: a real sequence, so it is numbered */
.flow { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 36px; padding: 0; }
.flow li { counter-increment: step; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.flow li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 14px var(--display); }
.flow b { display: block; font: 700 17px/1.3 var(--display); margin-bottom: 6px; }
.flow span { color: var(--muted); font-size: 15px; }
.ai-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.ai-points li { color: var(--muted); padding-left: 22px; position: relative; }
.ai-points li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.ai-points b { color: var(--text); }

/* Pricing */
.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.price { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.price h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 18px; }
.amount { margin: 0; font: 700 56px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.amount .cur { font-size: 18px; font-weight: 700; letter-spacing: .04em; color: var(--muted); margin-right: 8px; vertical-align: .9em; }
.unit { margin: 8px 0 0; color: var(--muted); }
.price .vol { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.price .vol strong { color: var(--brand); font-variant-numeric: tabular-nums; }
.tiers { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.tiers li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.tiers b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.included { margin-top: 28px; padding: 26px; border-radius: 18px; background: var(--band); }
.included h3 { margin: 0 0 14px; font-size: 18px; }
.included ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.included li { padding-left: 26px; position: relative; }
.included li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }

/* Developers */
.dev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.dev h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; margin: 0 0 10px; }
.dev-text > p { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.dev-text ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.code { min-width: 0; overflow-x: auto; background: var(--code-bg); color: var(--code-text); border-radius: 16px; padding: 22px 24px; }
.code pre { margin: 0; font: 13.5px/1.7 var(--mono); }
.code b { color: var(--mint); font-weight: 600; }
.code .c { color: var(--code-dim); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); max-width: 760px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font: 600 17px var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 64ch; }

/* Closing band */
.closing { background: var(--brand); color: #fff; }
.closing-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 48px; }
.closing h2 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); }
.closing .btn { background: #fff; border-color: #fff; color: #0d6e4a; }
.closing .btn.primary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }

/* Footer */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 24px 32px; color: var(--muted); font-size: 14px; }
.foot span { display: flex; align-items: center; gap: 8px; }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--muted); }

@media (max-width: 960px) {
  .hero, .dev { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .links { display: none; }
  .btn.ghost { margin-left: auto; }
}
@media (max-width: 640px) {
  .hero { padding-top: 36px; }
  .channels, .features, .flow, .prices, .ai-points, .included ul { grid-template-columns: minmax(0, 1fr); }
  .channels { gap: 4px; }
  .mock-body { grid-template-columns: minmax(0, 1fr); }
  .mock-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .mock-list li:nth-child(n+3) { display: none; }
  .section { padding-block: 52px; }
}

/* Contact form: posts without a script, so it works under the page's CSP */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.contact h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; margin: 0 0 10px; }
.contact-text > p { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.contact-text ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.contact-text b { color: var(--text); }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fields label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; }
.fields .wide { grid-column: 1 / -1; }
.fields input, .fields select, .fields textarea { width: 100%; font: 15px/1.4 var(--body); color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.fields textarea { resize: vertical; min-height: 120px; }
.fields input:focus, .fields select:focus, .fields textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.req { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 6px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-hint { color: var(--muted); font-size: 14px; margin: 14px 0; }
.form-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.form-note.ok { background: var(--brand-soft); color: var(--text); border: 1px solid var(--brand); }
.form-note.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); }
@media (max-width: 960px) { .contact { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 640px) { .fields { grid-template-columns: minmax(0, 1fr); } .contact-form { padding: 18px; } }

/* Free test call to action, under the prices */
.trial-box { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 26px; border-radius: 18px; border: 1px solid var(--brand); background: var(--brand-soft); }
.trial-box h3 { margin: 0 0 4px; font-size: 18px; }
.trial-box p { margin: 0; color: var(--muted); max-width: 56ch; }

/* Cost calculator: a GET form the server answers, no script */
.calc { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.calc h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; margin: 0 0 10px; }
.calc-text > p { color: var(--muted); font-size: 17px; margin: 0; }
.calc-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; min-width: 0; }
.calc-form { display: grid; gap: 16px; justify-items: start; }
.calc-fields { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-fields .lbl { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.calc-fields input { font-variant-numeric: tabular-nums; }
.calc-out { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.calc-empty { margin: 0; color: var(--muted); }
.calc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc-table caption { text-align: left; font: 700 18px var(--display); margin-bottom: 8px; }
.calc-table th, .calc-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.calc-table thead th { font-size: 13px; font-weight: 600; color: var(--muted); }
.calc-table thead th:last-child { text-align: right; }
.calc-table tbody th { font-weight: 600; white-space: nowrap; }
.calc-table tbody th .ch { margin-right: 8px; }
.calc-table td { color: var(--muted); }
.calc-table .num { text-align: right; color: var(--text); white-space: nowrap; }
.calc-table tfoot th, .calc-table tfoot td { border-bottom: 0; padding-top: 14px; font: 700 20px var(--display); color: var(--text); }
.calc-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 960px) { .calc { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 640px) {
  .calc-box { padding: 18px 14px; }
  .calc-fields { grid-template-columns: minmax(0, 1fr); }
  .calc-table th, .calc-table td { padding: 9px 4px; font-size: 14px; }
  .calc-table td { font-size: 13px; white-space: nowrap; }
  .calc-table td.num { white-space: normal; }
  .calc-table tbody th .ch { display: none; }
  .trial-box { padding: 18px; }
}
