/* Ruambox marketing site. Hand-written, no build step.
   Palette from brand/BRAND.md (same values as src/app/globals.css in the app). */

:root {
  color-scheme: light; /* the wordmark is dark plum; no dark theme until a light logo exists */
  --ink: #2d0f4f;
  --ink-soft: #55407a; /* body text on light backgrounds, 7.6:1 on off-white */
  --purple: #7a4dff;
  --purple-deep: #6238e0;
  --lilac: #c9b3ff;
  --tint: #f1ebff;
  --off: #faf8ff;
  --white: #ffffff;
  --line: #e6dcff;
  --ok: #1f7a4d;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(45, 15, 79, 0.06), 0 12px 32px -12px rgba(45, 15, 79, 0.18);
  --wrap: 1120px;
  --font: "Nunito", "Noto Sans Thai", ui-rounded, system-ui, -apple-system, "Segoe UI",
    "Leelawadee UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--off);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--purple-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

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

.on-dark :focus-visible {
  outline-color: var(--white);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
  color: var(--white);
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--purple);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--purple-deep);
  color: var(--white);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border-color: var(--lilac);
}

.btn-ghost:hover {
  border-color: var(--purple);
  color: var(--ink);
}

.btn-light {
  background: var(--white);
  color: var(--ink);
}

.btn-light:hover {
  background: var(--tint);
  color: var(--ink);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline-light:hover {
  border-color: var(--white);
  color: var(--white);
}

.btn-sm {
  min-height: 40px;
  padding: 6px 16px;
  font-size: 0.9375rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  flex: none;
}

.logo img {
  height: 30px;
  width: auto;
}

.nav {
  display: none;
}

.nav a {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 8px 4px;
}

.nav a:hover {
  color: var(--purple-deep);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.875rem;
  text-decoration: none;
}

.lang:hover {
  background: var(--tint);
  color: var(--ink);
}

@media (min-width: 900px) {
  .logo img {
    height: 34px;
  }
  .header-actions {
    gap: 10px;
  }
}

@media (min-width: 1080px) {
  .nav {
    display: flex;
    gap: 20px;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--purple-deep);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.section-head {
  max-width: 680px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 1.75rem;
}

.section-head p {
  margin-top: 12px;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .section {
    padding: 96px 0;
  }
  .section-head {
    margin-bottom: 48px;
  }
  .section-head h2 {
    font-size: 2.25rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 64px;
  background:
    radial-gradient(60% 55% at 100% 0%, rgba(201, 179, 255, 0.55) 0%, rgba(201, 179, 255, 0) 70%),
    radial-gradient(45% 50% at 0% 100%, rgba(201, 179, 255, 0.35) 0%, rgba(201, 179, 255, 0) 70%),
    var(--off);
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero-copy,
.hero-art {
  min-width: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--lilac);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}

.pill-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}

.hero h1 {
  margin-top: 18px;
  font-size: 2.125rem;
  line-height: 1.25;
}

.hero h1 .accent {
  color: var(--purple-deep);
}

.hero .lead {
  margin-top: 16px;
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

@media (min-width: 560px) {
  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 88px 0 104px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
  }
  .hero h1 {
    font-size: 3.25rem;
    line-height: 1.2;
  }
  .hero .lead {
    font-size: 1.25rem;
  }
}

/* ---------- Hero illustration (drawn in CSS, not a screenshot) ---------- */

.mock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.5;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--off);
}

.mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lilac);
}

.mock-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.mock-list {
  display: none;
  border-right: 1px solid var(--line);
  padding: 8px;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
}

.mock-row.is-active {
  background: var(--tint);
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lilac);
  color: var(--ink);
  font-weight: 800;
}

.avatar.a2 {
  background: #ffd9c2;
}

.avatar.a3 {
  background: #c8ecd9;
}

.mock-row-text {
  min-width: 0;
  flex: 1;
}

.mock-name {
  display: block;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-sub {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-unread {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple);
}

.mock-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mock-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.mock-tag {
  flex: none;
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.mock-msgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--off);
}

.bubble {
  max-width: 85%;
  padding: 8px 14px;
  border-radius: 18px;
}

.bubble.in {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.bubble.out {
  align-self: flex-end;
  background: var(--purple);
  color: var(--white);
  border-bottom-right-radius: 6px;
}

.mock-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.mock-field {
  flex: 1;
  min-width: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

.mock-send {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  font-weight: 800;
}

.mock-caption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  text-align: center;
}

@media (min-width: 560px) {
  .mock-body {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
  .mock-list {
    display: block;
  }
}

/* ---------- Illustrations ----------
   The artwork files are opaque off-white. Each one fills a rounded, clipped tile edge to edge,
   so no rectangle edge can show against gradients, white cards or the dark band. */

.art {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--off);
}

.art img {
  width: 100%;
  height: auto;
}

.hero-art .art {
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.preview {
  max-width: 760px;
  margin: 40px auto 0;
}

.preview-title {
  margin-bottom: 16px;
  font-size: 1.1875rem;
  text-align: center;
}

.split {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-bottom: 36px;
}

.split > * {
  min-width: 0;
}

.split .section-head {
  margin-bottom: 0;
}

.split-art {
  order: -1;
  width: 100%;
  max-width: 440px;
}

.band .split-art {
  order: 0;
  max-width: 260px;
  border: 0;
  border-radius: 28px;
}

.step {
  display: flex;
  flex-direction: column;
}

.step-art {
  order: -1;
  align-self: center;
  width: 100%;
  max-width: 240px;
  margin-bottom: 20px;
  border-radius: 14px;
}

@media (min-width: 900px) {
  .preview {
    margin-top: 56px;
  }
  .split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 56px;
    margin-bottom: 48px;
  }
  .split-art {
    order: 0;
    max-width: none;
  }
  .band .split {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .band .split-art {
    max-width: none;
  }
  .step-art {
    max-width: none;
  }
}

/* ---------- Cards and grids ---------- */

.grid {
  display: grid;
  gap: 16px;
}

.card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.section-alt .card {
  background: var(--off);
}

.card h3 {
  font-size: 1.1875rem;
}

.card p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--purple-deep);
}

.icon svg {
  width: 26px;
  height: 26px;
}

@media (min-width: 640px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid {
    gap: 20px;
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card {
    padding: 28px;
  }
}

@media (min-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Steps ---------- */

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

/* ---------- Custom functions ---------- */

.examples {
  margin-bottom: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chips li {
  padding: 6px 14px;
  border: 1px solid var(--lilac);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.5;
}

.examples p {
  margin-top: 14px;
  font-size: 0.9375rem;
}

.fineprint + .cta-row {
  margin-top: 20px;
}

@media (min-width: 640px) {
  .examples {
    margin-bottom: 20px;
  }
}

/* ---------- Channels ---------- */

.status {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.5;
}

.status-now {
  background: #dff5e8;
  color: #14553a;
}

.status-soon {
  background: var(--tint);
  color: var(--purple-deep);
}

.status-plan {
  background: #efedf3;
  color: var(--ink-soft);
}

.checks {
  margin-top: 14px;
}

.checks li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
}

.checks li + li {
  margin-top: 8px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.5em;
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--purple);
  border-bottom: 3px solid var(--purple);
  transform: rotate(-45deg);
}

.checks.dots li::before {
  left: 8px;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--lilac);
  transform: none;
}

.fineprint {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ---------- Security band ---------- */

.band {
  background: var(--ink);
  color: var(--white);
}

.band .eyebrow {
  color: var(--lilac);
}

.band .section-head p {
  color: #e3d8ff;
}

.band .card {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.band .card p {
  color: #e3d8ff;
}

.band .icon {
  background: rgba(201, 179, 255, 0.18);
  color: var(--lilac);
}

.band a {
  color: var(--white);
}

/* ---------- Early access ---------- */

.cta-card {
  padding: 32px 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, #7a4dff 0%, #5a2fd6 100%);
  color: var(--white);
}

.cta-card h2 {
  font-size: 1.625rem;
}

.cta-card p {
  margin-top: 12px;
  max-width: 640px;
  color: #f1ebff;
}

.cta-card .cta-row {
  margin-top: 24px;
}

@media (min-width: 900px) {
  .cta-card {
    padding: 56px;
  }
  .cta-card h2 {
    font-size: 2.125rem;
  }
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 800px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.faq details + details {
  margin-top: 12px;
}

.faq summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  border-radius: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -8px;
  border-right: 3px solid var(--purple);
  border-bottom: 3px solid var(--purple);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.faq .answer {
  padding: 0 20px 20px;
  color: var(--ink-soft);
}

.faq .answer p + p {
  margin-top: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: var(--white);
  font-size: 0.9375rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand img {
  height: 28px;
  width: auto;
}

.footer-brand p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  font-weight: 700;
}

.footer-links a[aria-current="true"] {
  color: var(--ink-soft);
  text-decoration: none;
}

.copyright {
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

@media (min-width: 900px) {
  .footer-grid {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 40px 0 72px;
}

.legal .wrap {
  max-width: 800px;
}

.ea-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--purple-deep);
  font-size: 0.875rem;
  font-weight: 800;
}

.legal .ea-note {
  margin-top: 16px;
  padding: 14px 18px;
  border-left: 4px solid var(--purple);
  border-radius: 0 12px 12px 0;
  background: var(--tint);
  color: var(--ink);
  font-size: 0.9375rem;
}

.legal h1 {
  margin-top: 16px;
  font-size: 2rem;
}

.legal .updated {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.legal h2 {
  margin-top: 40px;
  font-size: 1.375rem;
}

.legal h3 {
  margin-top: 24px;
  font-size: 1.0625rem;
}

.legal p,
.legal ul,
.legal ol,
.legal .table-scroll {
  margin-top: 12px;
}

.legal ul,
.legal ol {
  padding-left: 24px;
}

.legal ul {
  list-style: disc;
}

.legal ol {
  list-style: decimal;
}

.legal li + li {
  margin-top: 6px;
}

.legal .summary {
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.legal .summary h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

.table-scroll {
  margin-top: 12px;
}

.legal ul,
.legal ol {
  padding-left: 24px;
}

.legal ul {
  list-style: disc;
}

.legal ol {
  list-style: decimal;
}

.legal li + li {
  margin-top: 6px;
}

.legal .summary {
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.legal .summary h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

.ph {
  padding: 1px 6px;
  border: 1px dashed #b54708;
  border-radius: 6px;
  background: #fff4e5;
  color: #8a3505;
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--tint);
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 900px) {
  .legal {
    padding: 64px 0 104px;
  }
  .legal h1 {
    font-size: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip {
    display: none;
  }
  body {
    background: #fff;
  }
}
