/* red5chat.com — site styles */
:root {
  --ink: #101A2B;
  --paper: #EEF1F4;
  --surface: #FFFFFF;
  --signal: #E0312B;
  --signal-ink: #B4231E;
  --steel: #56667B;
  --line: #CBD3DD;
  --text: var(--ink);
  --muted: var(--steel);
  --bg: var(--paper);
  --band: #E2E7ED;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --radius-lg: 14px;
  --radius-sm: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1624;
    --surface: #16213A;
    --band: #121C2F;
    --text: #E6EBF1;
    --muted: #9AA8BA;
    --line: #2A3852;
    --signal-ink: #FF6B63;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1624; --surface: #16213A; --band: #121C2F;
  --text: #E6EBF1; --muted: #9AA8BA; --line: #2A3852; --signal-ink: #FF6B63;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img, iframe, svg { display: block; max-width: 100%; }
a { color: var(--signal-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 8px 24px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.top-in nav { margin-left: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 1.35rem/1 var(--display); letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px 20px; list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--signal-ink); }
.nav .nav-cta { background: var(--signal); color: #fff; padding: 8px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; }
.nav .nav-cta .tally { background: #fff; width: 8px; height: 8px; }
.nav .nav-cta:hover { background: var(--signal-ink); color: #fff; }
@media (max-width: 860px) { .nav .nav-sec { display: none; } }

/* Hero */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-copy h1 { max-width: 12ch; margin-bottom: 24px; }
.lede { font-size: 1.2rem; max-width: 34em; }
.lede-sub { color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn { display: inline-block; padding: 13px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; line-height: 1.2; border: 2px solid transparent; }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-ink); }
.btn-quiet { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-quiet:hover { border-color: var(--text); }

/* The live chat, framed like a broadcast monitor */
.monitor { margin: 0; background: var(--ink); border-radius: var(--radius-lg); padding: 10px; box-shadow: 0 30px 60px -30px rgba(16, 26, 43, .55); }
.monitor-bar { display: flex; align-items: center; gap: 10px; color: #E6EBF1; font: 600 .85rem/1 var(--body); padding: 6px 6px 12px; }
.monitor-host { margin-left: auto; color: #9AA8BA; font-weight: 400; }
.tally { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(224, 49, 43, .6); animation: tally 2.4s ease-out infinite; }
@keyframes tally { 0% { box-shadow: 0 0 0 0 rgba(224, 49, 43, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(224, 49, 43, 0); } }
.monitor-screen { border-radius: 8px; overflow: hidden; background: #0A1220; aspect-ratio: 4 / 3; min-height: 420px; }
.monitor-screen iframe { width: 100%; height: 100%; border: 0; }
.monitor figcaption { color: #9AA8BA; font-size: .85rem; padding: 10px 6px 2px; }
.monitor figcaption a { color: #fff; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 16ch; }
  .monitor-screen { aspect-ratio: auto; height: 78vh; height: 78dvh; min-height: 480px; }
}

/* Sections */
section { padding: clamp(56px, 8vw, 96px) 0; }
.band { background: var(--band); }
.section-lede { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin: 12px 0 40px; }

/* Timeline (a real sequence of years) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 2.05rem; height: 2px; background: var(--line); }
.timeline li { position: relative; padding-top: 3.2rem; }
.timeline li::before { content: ""; position: absolute; top: calc(2.05rem - 6px); left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--steel); }
.timeline li.now::before { background: var(--signal); border-color: var(--signal); }
.year { position: absolute; top: 0; left: 0; font: 800 1.5rem/1 var(--display); letter-spacing: -0.02em; }
.timeline .now .year { color: var(--signal-ink); }
.timeline h3 { margin-bottom: 8px; font-size: 1.15rem; }
.timeline p { color: var(--muted); }
@media (max-width: 820px) {
  .timeline { grid-template-columns: 1fr; gap: 28px; padding-left: 28px; }
  .timeline::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
  .timeline li { padding-top: 2.2rem; }
  .timeline li::before { left: -28px; top: 4px; }
}

/* Products: lead + two supporting */
.products { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; }
.product h3 { font-size: 1.6rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.product h3 a { color: var(--text); text-decoration: none; }
.product h3 a:hover { color: var(--signal-ink); }
.product-what { font-weight: 600; }
.product-for { color: var(--muted); font-style: italic; margin-top: auto; padding-top: 8px; }
.product .btn { align-self: flex-start; margin-top: 8px; }
.product-lead { background: var(--ink); color: #E6EBF1; border-color: var(--ink); }
.product-lead h3 a { color: #fff; }
.product-lead .product-for { color: #9AA8BA; }
:root[data-theme="dark"] .product-lead { border-color: var(--signal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .product-lead { border-color: var(--signal); } }
.tag { font: 700 .75rem/1 var(--body); background: var(--signal); color: #fff; padding: 4px 7px; border-radius: var(--radius-sm); }
@media (max-width: 960px) { .products { grid-template-columns: 1fr; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 0; }
.features div { padding: 18px 0; border-top: 1px solid var(--line); }
.features dt { font: 700 1.1rem/1.3 var(--display); margin-bottom: 4px; }
.features dd { margin: 0; color: var(--muted); }
@media (max-width: 680px) { .features { grid-template-columns: 1fr; } }

/* FAQ */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font: 700 1.15rem/1.35 var(--display); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p, details pre { margin-bottom: 1em; }
details > :last-child { margin-bottom: 22px; }
pre { background: var(--ink); color: #E6EBF1; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: .85rem; line-height: 1.5; }
#faq h2 { margin-bottom: 28px; }

/* Contact */
.contact h2 { margin-bottom: 16px; }
.contact p { font-size: 1.1rem; max-width: 36em; }

/* Footer */
.foot { padding: 48px 0 32px; border-top: 1px solid var(--line); font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 6px; }
.foot-brand { font: 800 1.3rem/1 var(--display); margin-bottom: 10px; }
.foot-h { font-weight: 600; margin-bottom: 10px; }
.copy { color: var(--muted); font-size: .85rem; margin-top: 32px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }


/* Language switcher */
.langs { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.langs a { display: block; padding: 6px 7px; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: var(--radius-sm); }
.langs a:hover { color: var(--text); background: var(--band); }
.langs a[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }

/* Full-screen trigger on the homepage monitor */
.monitor-fs { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #E6EBF1; text-decoration: none; font-size: .85rem; padding: 4px 8px; border-radius: var(--radius-sm); }
.monitor-fs:hover { background: rgba(255,255,255,.1); }
.monitor-screen iframe:fullscreen { width: 100vw; height: 100vh; }

/* Demo page: the chat fills the whole viewport */
.demo { background: var(--ink); }
.demo-stage { height: 100vh; height: 100dvh; background: var(--ink); }
.demo-stage iframe { width: 100%; height: 100%; border: 0; }
.demo-info { background: var(--bg); padding: 56px 0 64px; }
.demo-info h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 12px 0 20px; }
.demo-info .actions { margin: 28px 0; }
.crumbs { font-size: .9rem; color: var(--muted); }
.demo-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0 0 20px; }

/* 404 */
.notfound { padding: 64px 0; }
.notfound h1 { margin: 40px 0 16px; }
.notfound .actions { margin: 28px 0; }

/* Shared bits for inner pages */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.nav a[aria-current="page"] { color: var(--signal-ink); }
.h-link { color: inherit; text-decoration: none; }
.h-link:hover { color: var(--signal-ink); }
.more { margin-top: 32px; }
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; margin: 14px 0 0; }
.page-head .section-lede { margin-bottom: 0; }
.page-head + section { padding-top: clamp(16px, 3vw, 32px); }
.crumbs a { color: var(--muted); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-top: 32px; }
.foot-bottom .copy { margin: 0; }
.foot-langs { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; font-size: .9rem; }

/* Home: FAQ + contact teasers side by side */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); }
.split h2 { margin-bottom: 14px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.split p { max-width: 34em; }
@media (max-width: 760px) { .split-grid { grid-template-columns: 1fr; } }

/* Features page */
.features-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .features-3 { grid-template-columns: 1fr; } }
.steps { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--signal); color: #fff; font: 800 1.2rem/1 var(--display); margin-bottom: 14px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.cta-band { background: var(--ink); color: #E6EBF1; text-align: left; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band .btn-quiet { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn-quiet:hover { border-color: #fff; }

/* Products page */
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--signal); border-bottom: 2px solid var(--signal); transform: rotate(-45deg); }
.product-lead .ticks li::before { border-color: #fff; }
.product h2 { font-size: 1.6rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.product h2 a { color: var(--text); text-decoration: none; }
.product-lead h2 a { color: #fff; }
.which { margin: 24px 0 0; }
.which div { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: baseline; }
.which div:last-child { border-bottom: 1px solid var(--line); }
.which dd { margin: 0; font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { .which div { grid-template-columns: 1fr; gap: 4px; } }

/* FAQ page */
.faq-list summary h2 { display: inline; font: inherit; letter-spacing: inherit; }
.after-faq { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-main h2 { margin-bottom: 16px; font-size: 1.5rem; }
.contact-main h3 { margin: 36px 0 14px; font-size: 1.15rem; }
.contact-card { font-style: normal; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.contact-card h2 { font: 600 .95rem/1.3 var(--body); color: var(--muted); margin: 0 0 6px; letter-spacing: 0; }
.contact-card p { margin-bottom: 22px; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card .big { font: 700 1.4rem/1.2 var(--display); color: var(--text); text-decoration: none; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* Legal pages */
.legal { padding-top: 0; }
.legal section { padding: 0; margin-bottom: 36px; }
.legal h2 { font-size: 1.35rem; margin-bottom: 12px; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 8px; }
.legal code { font-size: .9em; background: var(--band); padding: 1px 5px; border-radius: 4px; }
.note { background: var(--band); border-left: 3px solid var(--signal); padding: 12px 16px; margin-top: 16px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 40px; background: var(--surface); }
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
