/* Gradion Dispact — public pages (welcome, support, legal)
   Standalone static styling. Outside the Forge/product token pipeline.
   System font stack on purpose: these pages load no third-party fonts,
   matching the no-tracking promise in the Privacy Policy. */

:root {
  /* Brand */
  --accent: #ff6b00;
  --accent-2: #ff8a4b;
  --accent-ink: #ffffff;
  --accent-grad: linear-gradient(135deg, #ff8a4b 0%, #ff6b00 100%);

  /* Warm neutrals (light) */
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f7f5f1;
  --ink: #211d18;
  --muted: #6b6258;
  --line: #ece7e0;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

  /* Shape */
  --maxw: 760px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Depth */
  --shadow-sm: 0 1px 2px rgba(33, 29, 24, 0.06), 0 1px 3px rgba(33, 29, 24, 0.05);
  --shadow-md: 0 4px 12px rgba(33, 29, 24, 0.07), 0 2px 4px rgba(33, 29, 24, 0.05);
  --shadow-lg: 0 18px 40px rgba(33, 29, 24, 0.10), 0 6px 14px rgba(33, 29, 24, 0.06);
  --ring: 0 0 0 3px rgba(255, 107, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --surface: #1d1a15;
    --surface-2: #221e18;
    --ink: #f4efe7;
    --muted: #a89e90;
    --line: #2f2a23;
    --accent: #ff7d1f;
    --accent-2: #ff9a57;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
    --ring: 0 0 0 3px rgba(255, 125, 31, 0.35);
  }
}

* { box-sizing: border-box; }

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.landing { overflow-x: hidden; }

/* Soft brand glow anchored top-center, behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  background:
    radial-gradient(60% 100% at 50% -10%, rgba(255, 138, 75, 0.18), rgba(255, 138, 75, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

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

header.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-head .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
}

.site-head img { height: 30px; width: auto; display: block; }

.site-head .name { font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }

/* ---- Typography ------------------------------------------------------ */

h1 {
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 28px 0 8px;
}

h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 40px 0 8px;
  scroll-margin-top: 84px;
}

h3 { font-size: 18px; margin: 24px 0 6px; }

p, li { color: var(--ink); }

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
}

a:hover { text-decoration-color: var(--accent); }

strong { font-weight: 650; }

.dates {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

ul { padding-left: 22px; }

li { margin: 5px 0; }

/* ---- Tables ---------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 18px 0;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

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

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

th {
  background: var(--surface-2);
  font-weight: 650;
  color: var(--ink);
}

tbody tr:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }

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

footer.site-foot {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 48px auto 0;
  padding: 28px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-foot nav { margin-bottom: 10px; }

.site-foot a {
  margin-right: 18px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 550;
}

.site-foot a:hover { color: var(--accent); }

/* ---- Landing / hero -------------------------------------------------- */

.hero {
  text-align: center;
  padding: 56px 0 28px;
}

.hero .mark {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 8px 20px rgba(255, 107, 0, 0.28));
}

.hero h1 { margin: 22px 0 0; }

.hero .tagline {
  color: var(--muted);
  font-size: clamp(17px, 2.4vw, 19px);
  max-width: 540px;
  margin: 12px auto 0;
}

/* ---- Feature grid ---------------------------------------------------- */

.features {
  list-style: none;
  padding: 0;
  margin: 36px 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.feature .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}

.feature .ico svg { width: 22px; height: 22px; }

.feature h3 { margin: 0 0 6px; }

.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- Store badges + CTA --------------------------------------------- */

.badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 36px 0 8px;
}

/* Official App Store / Google Play badges (self-hosted artwork). */
.badges { align-items: center; }

.storebadge { display: inline-flex; }

.storebadge img { display: block; width: auto; }

/* Apple SVG is tightly cropped; Google's official PNG ships with built-in
   clear space, so it renders a touch taller to match the visible height. */
.storebadge .b-apple { height: 44px; }

.storebadge .b-google { height: 64px; }

.storebadge[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.badge svg { width: 24px; height: 24px; flex: none; }

.badge .b-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }

.badge .b-small { font-size: 11px; opacity: 0.8; font-weight: 500; }

.badge .b-big { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }

.badge[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.cta-row { text-align: center; margin: 6px 0 8px; }

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--accent);
}

.cta-link:hover { gap: 9px; }

/* ---- Support cards --------------------------------------------------- */

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 22px 0 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card h3 { margin: 0 0 6px; }

.card p { margin: 0; color: var(--muted); font-size: 15px; }

.card a { font-weight: 600; }

/* ---- Table of contents (legal) -------------------------------------- */

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin: 22px 0 8px;
  box-shadow: var(--shadow-sm);
}

.toc .toc-title {
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
  font-size: 15px;
}

.toc li { margin: 4px 0; break-inside: avoid; }

.toc a { text-decoration: none; font-weight: 550; }

.toc a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .toc ol { columns: 1; }
}

/* ---- Focus visibility ------------------------------------------------ */

a:focus-visible,
.badge:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

/* ====================================================================== */
/* Warm Glow — landing direction (scoped to body.landing where it could   */
/* leak onto legal/support; new component classes are welcome-only).      */
/* ====================================================================== */

/* Intensified, twin-blob brand glow + same-origin grain (no banding). */
body.landing::before {
  height: 680px;
  background:
    radial-gradient(70% 90% at 50% -8%, rgba(255, 138, 75, 0.30), rgba(255, 138, 75, 0) 66%),
    radial-gradient(42% 60% at 84% 16%, rgba(255, 107, 0, 0.12), rgba(255, 107, 0, 0) 70%);
}

body.landing::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Hero (landing) -------------------------------------------------- */

.hero { text-align: center; padding: 52px 0 16px; }

.wordmark {
  height: 46px;
  width: auto;
  filter: drop-shadow(0 10px 22px rgba(255, 107, 0, 0.28));
}

.hero h1 {
  font-size: clamp(27px, 7vw, 60px);
  line-height: 1.07;
  letter-spacing: -0.025em;
  max-width: 15ch;
  margin: 26px auto 0;
}

.grad-text { color: var(--accent); }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad-text {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.hero .tagline { max-width: 560px; margin: 18px auto 0; }

.privacy-line {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin: 16px auto 28px;
}

/* ---- Primary button -------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn .arr { transition: transform 0.16s ease; }

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 107, 0, 0.30), var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 107, 0, 0.38), var(--shadow-md);
}

.btn-primary:hover .arr { transform: translateX(3px); }

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 38%;
  height: 100%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  opacity: 0;
}

/* ---- CSS chat-window demo ------------------------------------------- */

.stage {
  position: relative;
  max-width: 660px;
  margin: 36px auto 18px;
  perspective: 1900px;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 2% 6% -6% 6%;
  z-index: -1;
  border-radius: 64px;
  background: var(--accent-grad);
  filter: blur(66px);
  opacity: 0.30;
}

.scene {
  position: relative;
  padding-bottom: 44px;
  transform: rotateX(2deg) rotateY(-7deg);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.stage:hover .scene { transform: none; }

/* ---- Desktop app window --------------------------------------------- */

.deskwin {
  width: 92%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dw-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.dw-bar .dots { display: inline-flex; gap: 6px; }

.dw-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }

.dw-title { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.dw-body { display: flex; min-height: 296px; }

.dw-side {
  flex: none;
  width: 166px;
  padding: 12px 9px;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
}

.side-ws { padding: 4px 8px 10px; font-size: 14px; font-weight: 700; color: var(--ink); }

.side-sec {
  padding: 12px 8px 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.side-ch,
.side-dm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
}

.side-ch .hash { color: color-mix(in srgb, var(--muted) 80%, transparent); }

.side-ch.active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 650;
}

.side-ch.active .hash { color: var(--accent); }

.side-dm .dm-av {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
}

.dw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dw-chhead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.dw-msgs { padding: 8px 6px 14px; }

/* ---- Phone, overlapping front-right --------------------------------- */

.phone {
  position: absolute;
  right: -8px;
  bottom: -8px;
  z-index: 4;
  width: 190px;
  padding: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 33px;
  box-shadow: var(--shadow-lg);
}

.phone-screen {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 27px;
  overflow: hidden;
}

.phone-top { position: relative; height: 22px; }

.phone-island {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 15px;
  border-radius: 999px;
  background: #1c1917;
  z-index: 2;
}

.ph-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.ph-head .chev { display: inline-flex; color: var(--muted); }

.ph-msgs { padding: 4px 2px 9px; }

.ph-msgs .msg { padding: 5px 8px; gap: 7px; }

.ph-msgs .avatar { width: 25px; height: 25px; border-radius: 8px; font-size: 11px; }

.ph-msgs .msg-head .who { font-size: 12px; }

.ph-msgs .msg-head .when { font-size: 10px; }

.ph-msgs .msg-text { font-size: 11.5px; line-height: 1.42; }

.ph-msgs .day-divider { margin: 2px 8px 6px; font-size: 10px; }

/* Channel-name lockups (shared by both windows). */
.demo-channel { font-size: 14px; font-weight: 650; color: var(--ink); }

.demo-channel .hash { color: var(--accent); margin-right: 1px; }

.ph-head .demo-channel { font-size: 12.5px; }

.meta {
  margin-left: auto;
  font-weight: 500;
  font-size: 12px;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.ph-head .meta { font-size: 10.5px; }

/* Floating UI accents over the scene. */
.floater {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.floater.react {
  top: -16px;
  right: 14%;
  gap: 5px;
  border-radius: var(--r-pill);
}

.floater.react b { color: var(--accent); }

.floater.presence {
  top: 12%;
  left: -5%;
  border-radius: var(--r-pill);
}

.floater.presence .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent);
}

.floater.toast {
  bottom: 16%;
  left: -6%;
  max-width: 224px;
  align-items: flex-start;
  text-align: left;
}

.floater.toast .t-ico {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
}

.floater.toast .t-body {
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.floater.toast .t-body b { color: var(--ink); font-weight: 650; }

/* Aria row crossfades between "typing" and a sent message (loop). */
.aria-swap { display: grid; }

.aria-swap > * { grid-area: 1 / 1; }

.aria-done { opacity: 0; }

/* Day divider — mirrors gw-ui DateDivider. */
.day-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 14px 8px;
  font-size: 12px;
  font-weight: 600;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.day-divider::before,
.day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Slack-style flat message row — mirrors gw-ui MessageRow + MessageBubble. */
.msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  transition: background 0.14s ease;
}

.msg:hover { background: var(--surface-2); }

.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.av-1 { background: #c9722f; }
.av-2 { background: #6f7689; }
.av-aria { background: var(--accent-grad); }

.msg-main { flex: 1; min-width: 0; }

.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.msg-head .who {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.375;
  color: var(--ink);
}

.msg-head .botbadge {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 1px 5px;
  border-radius: 5px;
}

.msg-head .when { font-size: 12px; color: color-mix(in srgb, var(--muted) 78%, transparent); }

.msg-text { font-size: 14.5px; line-height: 1.55; color: var(--ink); margin-top: 1px; }

/* Reactions — mirrors gw-ui ReactionChip. */
.reactions { display: flex; gap: 6px; margin-top: 6px; }

.rxn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.rxn.mine {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

/* Thread link — mirrors gw-ui ThreadLink. */
.threadlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
}

.threadlink:hover { border-color: var(--line); background: var(--surface-2); }

.thread-avs { display: inline-flex; }

.thread-avs span {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  margin-left: -4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 1.5px solid var(--surface);
}

.thread-avs span:first-child { margin-left: 0; }

.thread-count { font-size: 13px; font-weight: 650; color: var(--accent); }

.thread-when { font-size: 12px; color: color-mix(in srgb, var(--muted) 78%, transparent); }

/* Typing indicator — mirrors gw-ui MessageRow thinking state. */
.aria-typing { align-self: center; }

.aria-typing .msg-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.typedots { display: inline-flex; gap: 3px; }

.typedot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.4;
}

/* ---- Privacy panel --------------------------------------------------- */

.privacy { margin: 56px 0; }

.privacy-panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.privacy-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(75% 65% at 100% 0%, rgba(255, 107, 0, 0.10), rgba(255, 107, 0, 0) 62%);
  pointer-events: none;
}

.pp-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.pp-badge {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.28);
}

.pp-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }

.pp-head p { margin: 3px 0 0; color: var(--muted); font-size: 14.5px; }

.no-grid {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.no-item { display: flex; gap: 12px; align-items: flex-start; }

.no-ico {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}

.no-ico svg { width: 19px; height: 19px; }

.no-item b { display: block; font-size: 15px; color: var(--ink); }

.no-item span { font-size: 13px; line-height: 1.45; color: var(--muted); }

.pp-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  color: var(--accent);
}

.pp-link:hover { gap: 9px; }

@media (max-width: 560px) {
  .no-grid { grid-template-columns: 1fr; }
}

/* ---- Get / platform -------------------------------------------------- */

.get { text-align: center; margin: 52px 0 8px; }

.get h2 { margin: 0 0 6px; }

.get .sub { color: var(--muted); margin: 0 0 22px; }

.get .badges { margin-top: 24px; }

/* ---- Motion (gated; resting state always visible) -------------------- */

@media (prefers-reduced-motion: no-preference) {
  .hero > * { opacity: 0; animation: fadeUp 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
  .hero > *:nth-child(1) { animation-delay: 0.04s; }
  .hero > *:nth-child(2) { animation-delay: 0.12s; }
  .hero > *:nth-child(3) { animation-delay: 0.20s; }
  .hero > *:nth-child(4) { animation-delay: 0.28s; }
  .hero > *:nth-child(5) { animation-delay: 0.36s; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  .typedot { animation: blink 1.4s infinite both; }
  .typedot:nth-child(2) { animation-delay: 0.2s; }
  .typedot:nth-child(3) { animation-delay: 0.4s; }

  @keyframes blink {
    0%, 65%, 100% { opacity: 0.3; }
    32% { opacity: 0.9; }
  }

  .btn-primary:hover::before { animation: shine 0.7s ease; }

  @keyframes shine {
    from { left: -60%; opacity: 1; }
    to { left: 130%; opacity: 0; }
  }

  @supports (animation-timeline: view()) {
    .reveal { animation: revealIn linear both; animation-timeline: view(); animation-range: entry 0% cover 26%; }

    @keyframes revealIn {
      from { opacity: 0; transform: translateY(18px); }
      to { opacity: 1; transform: none; }
    }
  }
}

/* ---- Dark-mode landing tweaks --------------------------------------- */

@media (prefers-color-scheme: dark) {
  .demo-window { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-lg); }
  .demo::before { opacity: 0.24; }
  body.landing::before {
    background:
      radial-gradient(70% 90% at 50% -8%, rgba(255, 138, 75, 0.18), rgba(255, 138, 75, 0) 66%),
      radial-gradient(42% 60% at 84% 16%, rgba(255, 107, 0, 0.10), rgba(255, 107, 0, 0) 70%);
  }
  body.landing::after { opacity: 0.04; }
}

/* ---- Feature rows with mini-UIs ------------------------------------- */

.feature-rows { display: flex; flex-direction: column; gap: 18px; margin: 48px 0; }

.frow {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.frow:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}

.frow.alt { flex-direction: row-reverse; }

.fui { flex: none; width: 250px; }

.ftext { flex: 1; min-width: 0; }

.ftext h3 { margin: 0 0 5px; font-size: 19px; letter-spacing: -0.01em; }

.ftext p { margin: 0; color: var(--muted); font-size: 15px; }

.mini {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
}

/* faint accent wash in the corner for depth */
.mini::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 75% at 100% 0%, rgba(255, 107, 0, 0.12), rgba(255, 107, 0, 0) 60%);
  pointer-events: none;
}

/* 1 — rooms + thread */
.mini-rooms { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }

.room-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.room-pill .hash { color: color-mix(in srgb, var(--muted) 72%, transparent); }

.room-pill.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  color: var(--accent);
}

.room-pill.active .hash { color: var(--accent); }

.thread-chip { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 4px; }

.mini-avs { display: inline-flex; }

.mini-avs span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  margin-left: -5px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 1.5px solid var(--surface-2);
}

.mini-avs span:first-child { margin-left: 0; }

.thread-chip .tc { font-size: 12.5px; font-weight: 650; color: var(--accent); }

/* 2 — share (image + file) */
.mini-share { display: flex; flex-direction: column; gap: 9px; }

/* Believable shared-photo thumbnail (CSS-only sunset landscape). */
.imgthumb {
  position: relative;
  height: 72px;
  border-radius: 9px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 28%, #fff1d6 0, #ffd28a 5%, rgba(255, 210, 138, 0) 17%),
    linear-gradient(180deg, #ffc89f 0%, #ff9e64 50%, #ff7e38 100%);
}

.imgthumb::after {
  content: "";
  position: absolute;
  inset: 36% 0 0 0;
  background:
    radial-gradient(85% 125% at 24% 150%, #c0501c 0, #c0501c 56%, rgba(192, 80, 28, 0) 60%),
    radial-gradient(95% 125% at 80% 155%, #9e3f14 0, #9e3f14 54%, rgba(158, 63, 20, 0) 58%);
}

.img-tag {
  position: absolute;
  bottom: 7px;
  left: 8px;
  z-index: 1;
  font-size: 9.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 7px;
  border-radius: 5px;
}

.filechip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.fc-ico {
  flex: none;
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #e5484d;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.fc-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }

.fc-name { font-size: 12.5px; font-weight: 650; color: var(--ink); }

.fc-size { font-size: 11px; color: var(--muted); }

.fc-check {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
}

/* 3 — push (stacked notifications) */
.mini-push { position: relative; padding-top: 6px; }

.notif {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}

.notif.behind {
  position: absolute;
  left: 9px;
  right: 9px;
  top: -4px;
  z-index: 0;
  height: 26px;
  padding: 0;
  opacity: 0.55;
}

.notif-ico { flex: none; width: 26px; height: 26px; border-radius: 7px; overflow: hidden; }

.notif-ico img { width: 100%; height: 100%; display: block; }

.notif-body { flex: 1; min-width: 0; text-align: left; font-size: 12px; line-height: 1.35; color: var(--muted); }

.notif-body b { display: block; font-size: 12.5px; color: var(--ink); }

.notif-time { font-size: 10.5px; color: color-mix(in srgb, var(--muted) 70%, transparent); }

/* 4 — devices */
.mini-dev { display: flex; gap: 8px; }

.dev-chip {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink);
}

.dev-chip .dev-ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}

.dev-chip .dev-ico svg { width: 17px; height: 17px; }

.dev-sync {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.dev-sync .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent);
}

@media (max-width: 600px) {
  .frow,
  .frow.alt { flex-direction: column; text-align: center; gap: 16px; }
  .fui { width: 100%; }
}

/* ---- Motion: tilt depth, floaters, live conversation ---------------- */

@media (prefers-reduced-motion: no-preference) {
  .floater { animation: floatBob 5s ease-in-out infinite; }
  .floater.toast { animation-delay: -1.8s; }
  .floater.presence { animation-delay: -3.4s; }

  @keyframes floatBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
  }

  /* Conversation arrives in sequence on load (desktop window). */
  .dw-msgs > * { opacity: 0; animation: msgIn 0.5s ease forwards; }
  .dw-msgs > *:nth-child(1) { animation-delay: 0.25s; }
  .dw-msgs > *:nth-child(2) { animation-delay: 0.45s; }
  .dw-msgs > *:nth-child(3) { animation-delay: 0.95s; }
  .dw-msgs > *:nth-child(4) { animation-delay: 1.5s; }

  @keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }

  /* Aria crossfades typing -> sent message, looping. */
  .aria-typing { animation: ariaTyping 6.5s ease-in-out infinite; }
  .aria-done { animation: ariaDone 6.5s ease-in-out infinite; }

  @keyframes ariaTyping {
    0%, 38% { opacity: 1; }
    48%, 92% { opacity: 0; }
    100% { opacity: 1; }
  }

  @keyframes ariaDone {
    0%, 38% { opacity: 0; }
    48%, 92% { opacity: 1; }
    100% { opacity: 0; }
  }
}

/* Keep the tilt, floaters and live conversation on mobile too (this page
   is mainly viewed on phones). Pull floaters in to hug the device so they
   stay on-screen; the body guards against any horizontal scroll. */
/* Mobile: the desktop+phone scene is too wide for a phone, so show just the
   phone — clean, centered, still tilted. (This page is mainly for the apps.) */
@media (max-width: 600px) {
  .stage { max-width: 300px; }
  .scene { transform: rotateX(1deg) rotateY(-5deg); padding-bottom: 6px; }
  .deskwin { display: none; }
  .phone {
    position: static;
    width: 100%;
    margin: 0 auto;
    border-radius: 40px;
    padding: 9px;
  }
  .phone .phone-screen { border-radius: 32px; }
  .phone .phone-top { height: 26px; }
  .phone .phone-island { top: 8px; width: 66px; height: 18px; }
  .ph-head { padding: 9px 13px; }
  .ph-head .demo-channel { font-size: 14px; }
  .ph-head .meta { font-size: 12px; }
  .ph-msgs { padding: 6px 4px 11px; }
  .ph-msgs .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
  .ph-msgs .msg-head .who { font-size: 13.5px; }
  .ph-msgs .msg-head .when { font-size: 11px; }
  .ph-msgs .msg-text { font-size: 13px; }
  .floater.presence { display: none; }
  .floater { font-size: 11.5px; padding: 6px 10px; box-shadow: var(--shadow-md); }
  .floater.react { top: -10px; right: 4%; }
  .floater.toast { bottom: -6px; left: -2%; max-width: 200px; }
}
