/* Homedesk landing, both apps on one page (Julius, 7 Oct). A family hero with a
   photograph and the two product cards, shared facts, Homedesk Pro, then
   Homedesk Raptor in the layout taken from the Grok Bot page (x.ai/bot): the
   animated Mark beside the scripted app window, a statement card, animated
   feature cards, use cases beside a phone. Then the comparison, download
   requests and questions. The hex field runs behind the whole page, as on the
   aperintelligence.com redesign. Two flat themes (Julius, 2 Oct): black, a
   neutral near-true black, by default; and navy, the app's own near-black. The
   app window shows the app's own colours for the same theme (RAPTOR_THEMES in
   the app's dist/index.html, 3 Oct). */

/* Black: a neutral near-true black. */
:root, :root[data-theme="black"] {
  --face: "Manrope";
  --page: #07070a;
  --ink: #F5F1E6;
  --muted: #a9a9b3;
  --faint: #7f7f8a;
  --line: #1f1f27;
  --soft: #141419;
  --card: #0f0f14;
  --button: #F5F1E6;
  --button-ink: #07070a;
  --gold-soft: #F2C66D;
  /* Raptor's app surfaces in its black theme, as in the app itself. */
  --app-bg: #07070a;
  --app-surface: #0f0f14;
  --app-card: #141419;
  --app-border: #1f1f27;
  --app-ink: #e8eaf0;
  --app-muted: #8b93a7;
  --nav-h: 64px;
  --radius: 22px;
  --measure: 640px;
  color-scheme: dark;
}

/* Navy: the app's own near-black. */
:root[data-theme="navy"] {
  --page: #06080F;
  --muted: #a7adbb;
  --faint: #7d8597;
  --line: #1a2233;
  --soft: #10141f;
  --card: #0d1119;
  --button-ink: #06080F;
  /* Raptor's app surfaces in its navy theme. */
  --app-bg: #06080F;
  --app-surface: #0a0d14;
  --app-card: #10141f;
  --app-border: #1a2233;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.6 var(--face), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; margin: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
/* The blur backdrop only once content scrolls under it. */
.site-header.is-scrolled { background: color-mix(in srgb, var(--page) 82%, transparent); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.header-inner {
  max-width: 1240px;
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-wordmark { display: block; height: 30px; width: auto; }
.site-nav { display: flex; gap: 24px; font-size: 13px; color: var(--muted); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  font: 500 13px/1 var(--face), sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.button-dark { background: var(--button); color: var(--button-ink); }
.button-quiet { border: 1px solid var(--line); }

/* ---------- Hex field ---------- */

/* One fixed canvas (hexfield.js) over the hero photograph and under everything
   else. Every section but the hero sits at z-index 1 above it; the hero itself
   takes no z-index, so its photograph stays under the field and only its words
   and cards are lifted. main takes none either, or it would form a stacking
   context of its own and the order would break. The footer is lifted whole, so
   its solid band covers the field. */
#hexField { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main > section:not(.hero), .site-footer { position: relative; z-index: 1; }

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

/* Pulled up by the header's height so the photograph runs behind the sticky header,
   the way the aperintelligence.com redesign does it (home.css .hero). */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--nav-h) * -1);
  min-height: min(100vh, 920px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 56px) 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
/* Kept subtle on purpose (Julius, 7 Oct: "not too visible"): the photograph is
   softened and the wash below lets only about a fifth of it through. */
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(1.5px) saturate(0.8); animation: slow-zoom 30s ease-in-out infinite alternate; }
/* The wash darkens the photograph into the page colour of whichever theme is on:
   heaviest at the top under the header and at the foot where the page carries on. */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--page) 0%, transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--page) 80%, transparent) 0%, transparent 28%),
    color-mix(in srgb, var(--page) 80%, transparent);
}
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.hero-text { text-align: center; }
.hero-title { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; }
.hero-lead { max-width: 600px; margin: 18px auto 0; font-size: 16px; line-height: 1.6; color: var(--ink); opacity: 0.86; text-shadow: 0 1px 12px var(--page); }

/* The two products side by side, each with its own logo and Request download. */
.product-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.product-pick {
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(12px);
}
.product-pick-logo { height: 40px; width: auto; align-self: flex-start; }
.product-pick p { flex: 1; margin: 18px 0 22px; color: var(--muted); font-size: 14px; }
.product-pick-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- The two product sections ---------- */

.product { max-width: 1240px; margin: 0 auto; padding: 88px 24px 36px; }
.product-lead { max-width: var(--measure); margin: 16px 0 0; color: var(--muted); font-size: 15px; }
/* Each product section is headed by its own logo; the img alt is the heading text. */
.product-heading img { height: 52px; width: auto; }

/* Homedesk Pro: the words beside its Talk to list, then six short cards. */
.product-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 56px; align-items: center; }
.pro-figure { margin: 0; padding: 14px 10px; border-radius: var(--radius); background: var(--app-surface); border: 1px solid var(--app-border); color: var(--app-ink); font-size: 12px; }
.pro-figure .app-group { margin-top: 4px; }
.pro-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }

/* Homedesk Raptor: the animated Mark over the words on the left, its top level
   with the app window's on the right (Julius, 2 Oct). */
.raptor-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}
.raptor-intro-top { text-align: center; }  /* the Mark and its state line centred over the words (Julius, 2 Oct) */
.raptor-intro-mark { display: inline-flex; width: min(150px, 40vw); height: min(150px, 40vw); }
.raptor-intro-state { margin: 6px 0 18px; font-size: 14px; color: var(--faint); min-height: 1.6em; }
/* The window and its caption are one figure in the right column. */
.raptor-mock { margin: 0; width: 100%; max-width: 660px; justify-self: end; }
.mockup-note { margin: 8px 0 0; text-align: right; font-size: 12px; color: var(--faint); }

/* ---------- The app window (the scripted example) ---------- */

.app-window {
  display: grid;
  grid-template-columns: 196px 1fr;
  width: 100%;
  height: 480px;
  text-align: left;
  background: var(--app-bg);
  color: var(--app-ink);
  border: 1px solid var(--app-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(6, 8, 15, 0.55);
  font-size: 11px;
  line-height: 1.5;
}
.app-sidebar { background: var(--app-surface); border-right: 1px solid var(--app-border); padding: 14px 10px; overflow: hidden; }
.app-sidebar-top { padding: 2px 8px 12px; }
.app-wordmark { height: 24px; width: auto; }
.app-group { margin: 14px 10px 6px; font-size: 10px; color: var(--app-muted); }
.app-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; transition: background 0.3s; }
.app-row.is-open { background: var(--app-card); }
.app-row-text { min-width: 0; flex: 1; }
/* One line, as the app's rows: a long role label ends in an ellipsis before the floated time. */
.app-row-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row.is-chief .app-row-name { color: var(--gold-soft); }
.app-row-time { float: right; margin-left: 6px; font-weight: 400; font-size: 10px; color: var(--app-muted); }
.app-row-preview { display: block; font-size: 10px; color: var(--app-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-avatar {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--agent);
  background: color-mix(in srgb, var(--agent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--agent) 40%, transparent);
}
.app-avatar-mark { background: none; border: 0; }
.app-avatar-mission { --agent: var(--app-muted); }
.app-avatar-mission::after { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px; }

.app-main { display: grid; grid-template-rows: 44px minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--app-border); }
.app-topbar-who strong { color: var(--gold-soft); font-weight: 400; margin-right: 6px; }
.app-topbar-who { color: var(--app-muted); }
.app-topbar-status { font-size: 11px; color: var(--app-muted); }
.app-topbar-status.is-busy { color: #5AB8FF; }

.app-chat { padding: 18px 22px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
/* Newest at the bottom, with overflow counted below, so demo.js can remove the oldest whole. */
.app-chat > :first-child { margin-top: auto; }
.chat-message { max-width: 82%; opacity: 0; transform: translateY(6px); animation: appear 0.35s ease forwards; }
.chat-message.from-person { align-self: flex-end; background: #0B3A66; border-radius: 14px 14px 4px 14px; padding: 9px 13px; }
.chat-message.from-raptor { align-self: flex-start; }
.chat-thinking { display: flex; gap: 8px; align-items: center; color: var(--app-muted); }
.chat-thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-soft); animation: blink 1.2s infinite; }
.chat-thinking i:nth-child(2) { animation-delay: 0.2s; }
.chat-thinking i:nth-child(3) { animation-delay: 0.4s; }
.chat-card { background: var(--app-card); border: 1px solid var(--app-border); border-radius: 14px; padding: 12px 14px; }
.chat-card-heading { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.chat-card-badge { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 178, 63, 0.14); color: #FFB23F; white-space: nowrap; }
.chat-card-badge.is-working { background: rgba(90, 184, 255, 0.14); color: #5AB8FF; }
.chat-card-badge.is-done { background: rgba(16, 185, 129, 0.14); color: #34d399; }
.chat-card-buttons { display: flex; gap: 8px; margin-top: 10px; }
.chat-card-buttons span { padding: 4px 11px; border-radius: 8px; font-size: 11px; border: 1px solid var(--app-border); }
.chat-card-buttons .approve { background: #34d399; color: #062b1f; border-color: transparent; font-weight: 500; transition: transform 0.15s; }
.chat-card-buttons .approve.is-pressed { transform: scale(0.94); }
.chat-tasks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.chat-tasks li { display: flex; gap: 8px; align-items: center; color: var(--app-muted); }
.chat-tasks li b { color: var(--app-ink); font-weight: 400; min-width: 50px; }
.chat-tasks li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chat-tasks li.is-done::after { content: "Done"; margin-left: auto; color: #34d399; font-size: 10px; }
.chat-tasks li.is-working::after { content: "Working"; margin-left: auto; color: #5AB8FF; font-size: 10px; }
.chat-file { display: inline-block; margin-top: 8px; font-family: "JetBrains Mono", monospace; font-size: 11px; color: #4CC8F4; }

.app-composer { display: flex; align-items: center; gap: 10px; margin: 0 18px 16px; padding: 10px 12px; min-height: 44px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 14px; color: var(--app-muted); }
.app-composer-text { flex: 1; min-width: 0; }
.app-composer-text:empty::before { content: "Message Raptor"; }
.app-composer-send { width: 26px; height: 26px; border-radius: 50%; background: var(--app-card); border: 1px solid var(--app-border); }

@keyframes appear { to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

/* ---------- At a glance: four facts under the hero ---------- */

.facts { max-width: 1240px; margin: 0 auto; padding: 8px 24px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { padding: 20px 22px; border-radius: 18px; background: var(--card); }
.fact h2, .fact h3 { font-size: 15px; margin-bottom: 8px; }
.fact p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- Statement ---------- */

.statement { max-width: 1240px; margin: 0 auto; padding: 72px 24px 36px; }
.statement-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  background: var(--card);
  border-radius: 28px;
  padding: 44px 48px;
  overflow: hidden;
}
.statement-text h2 { font-size: clamp(20px, 1.9vw, 25px); margin-bottom: 12px; }
.statement-text p { color: var(--muted); max-width: 500px; margin: 0 0 12px; font-size: 14px; }
/* The app's own top bar, as it reads with the sidebar tucked away: the Mark beside its status line. */
.statement-figure { margin: 0; display: grid; place-items: center; }
.mini-topbar { display: flex; align-items: center; gap: 10px; width: min(360px, 100%); padding: 10px 14px; border-radius: 12px; background: var(--app-bg); border: 1px solid var(--app-border); color: var(--app-ink); font-size: 12px; }
.mini-topbar-mark { display: inline-flex; width: 32px; height: 32px; }
.mini-topbar-status { color: var(--app-muted); }

/* ---------- Missions: the four cards ---------- */

.features { max-width: 1240px; margin: 0 auto; padding: 72px 24px 36px; }
.section-title { font-size: clamp(20px, 1.9vw, 25px); text-align: center; }
.section-title-left { text-align: left; }
.section-lead { max-width: var(--measure); margin: 12px auto 0; text-align: center; color: var(--muted); font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.feature-card { background: var(--card); border-radius: var(--radius); padding: 26px; display: grid; grid-template-rows: auto 1fr; gap: 20px; min-height: 360px; }
.feature-text h3 { font-size: 15px; margin-bottom: 6px; }
.feature-text p { margin: 0; color: var(--muted); font-size: 13px; }
.feature-figure { margin: 0; display: grid; place-items: center; border-radius: 16px; background: var(--app-bg); color: var(--app-ink); padding: 20px; font-size: 11px; overflow: hidden; }

.mini-window { width: 100%; max-width: 360px; background: var(--app-card); border: 1px solid var(--app-border); border-radius: 12px; overflow: hidden; }
.mini-bar { display: flex; gap: 5px; align-items: center; padding: 8px 10px; background: var(--app-surface); border-bottom: 1px solid var(--app-border); }
.mini-bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--app-border); }
.mini-bar em { margin-left: 8px; font-style: normal; font-size: 10px; color: var(--app-muted); }
.mini-form { display: grid; gap: 10px; padding: 16px; }
.mini-form label { display: grid; gap: 4px; font-size: 10px; color: var(--app-muted); }
.mini-field { display: block; height: 28px; padding: 5px 8px; border-radius: 6px; background: var(--app-bg); border: 1px solid var(--app-border); color: var(--app-ink); font-size: 11px; }
.mini-field.is-typing { border-color: #4CC8F4; }
.mini-field.is-typing::after { content: ""; display: inline-block; width: 1px; height: 13px; margin-left: 1px; background: #4CC8F4; vertical-align: -2px; animation: blink 1s infinite; }
.mini-button { justify-self: start; padding: 5px 11px; border-radius: 6px; background: #0080E0; font-size: 11px; }

.approval-card { width: 100%; max-width: 360px; background: rgba(255, 178, 63, 0.08); border: 1px solid rgba(255, 178, 63, 0.45); border-radius: 12px; padding: 14px; }
.approval-heading { margin: 0 0 6px; color: #F5DC98; }
.approval-body { margin: 0; color: var(--app-muted); }
.approval-buttons { display: flex; gap: 8px; margin-top: 12px; }
.approval-buttons span { padding: 4px 11px; border-radius: 8px; font-size: 11px; border: 1px solid var(--app-border); }
.approval-buttons .approve { background: #34d399; color: #062b1f; border-color: transparent; font-weight: 500; transition: transform 0.15s; }
.approval-done { margin: 12px 0 0; color: #34d399; opacity: 0; transition: opacity 0.4s; }
.approval-card[data-state="approved"] .approve { transform: scale(0.94); }
.approval-card[data-state="approved"] .approval-done { opacity: 1; }

.criteria-list { list-style: none; counter-reset: criterion; width: 100%; max-width: 380px; margin: 0; padding: 0; display: grid; gap: 10px; }
.criteria-list li { counter-increment: criterion; position: relative; padding: 10px 12px 10px 40px; border-radius: 10px; background: var(--app-card); border: 1px solid var(--app-border); }
.criteria-list li::before { content: counter(criterion); position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--app-border); font-size: 10px; display: grid; place-items: center; color: var(--app-muted); transition: background 0.3s, color 0.3s; }
.criteria-list li span { display: block; font-size: 10px; color: var(--app-muted); opacity: 0; transition: opacity 0.3s; }
.criteria-list li.is-met::before { content: ""; background: #34d399 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.5l2.3 2.3 4.7-5' fill='none' stroke='%23062b1f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: transparent; }
.criteria-list li.is-met span { opacity: 1; }

.figure-engines { gap: 18px; }
.engine-pill { position: relative; height: 38px; width: 100%; max-width: 360px; }
.engine-pill span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 999px; padding: 0 14px; transition: opacity 0.5s, transform 0.5s; }
.engine-limit { background: rgba(255, 178, 63, 0.12); color: #FFB23F; }
.engine-answered { background: rgba(90, 184, 255, 0.12); color: #5AB8FF; opacity: 0; transform: translateY(8px); }
.engine-pill[data-state="answered"] .engine-limit { opacity: 0; transform: translateY(-8px); }
.engine-pill[data-state="answered"] .engine-answered { opacity: 1; transform: none; }
.engine-order { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.engine-order span { padding: 4px 10px; border-radius: 8px; background: var(--app-card); border: 1px solid var(--app-border); font-size: 11px; color: var(--app-muted); }
.engine-pill[data-state="limit"] ~ .engine-order span:first-child { color: #FFB23F; border-color: rgba(255, 178, 63, 0.45); }
.engine-pill[data-state="answered"] ~ .engine-order span:nth-child(2) { color: #5AB8FF; border-color: rgba(90, 184, 255, 0.45); }

/* The two static figures: a mission folder, and a schedule. */
.file-list { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 8px; width: 100%; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--app-ink); }
.file-list li { display: flex; justify-content: space-between; gap: 12px; }
.file-list li span { font-family: var(--face), sans-serif; color: var(--app-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-card { width: min(300px, 100%); padding: 14px 16px; border-radius: 12px; background: var(--app-card); border: 1px solid var(--app-border); }
.schedule-card p { margin: 0; }
.schedule-title { color: var(--app-ink); }
.schedule-when { margin-top: 4px; color: var(--gold-soft); }
.schedule-next { margin-top: 10px; font-size: 10px; color: var(--app-muted); }

/* ---------- Control ---------- */

.control { max-width: 1240px; margin: 0 auto; padding: 72px 24px 36px; }
.control-list { max-width: 1000px; margin: 28px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.control-list h3 { font-size: 15px; margin-bottom: 6px; }
.control-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- Use cases ---------- */

.use-cases { max-width: 1100px; margin: 0 auto; padding: 72px 24px 36px; display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.use-case-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.use-case-tabs button { font: 500 12px/1 var(--face), sans-serif; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.use-case-tabs button[aria-selected="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.use-case-summary { max-width: 440px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.phone { width: 270px; height: 540px; padding: 12px; border-radius: 46px; background: #0d0f14; box-shadow: inset 0 0 0 2px #2a2f3a, 0 30px 60px -30px rgba(6, 8, 15, 0.5); }
.phone-screen { height: 100%; border-radius: 36px; overflow: hidden; background: #0e1621; color: #e8eaf0; display: grid; grid-template-rows: auto 1fr; font-size: 12px; }
.phone-top { display: flex; gap: 8px; align-items: center; padding: 34px 16px 12px; background: #17212b; }
.phone-top em { font-style: normal; color: #7d8597; font-size: 12px; }
/* Telegram shows a bot's photo in a circle; the photo is the Mark on its navy tile. */
.phone-avatar { display: inline-flex; width: 26px; height: 26px; padding: 3px; border-radius: 50%; background: #0e1621; }
.phone-chat { padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.phone-chat > :first-child { margin-top: auto; }
.phone-message { max-width: 86%; padding: 8px 11px; border-radius: 12px; background: #182533; opacity: 0; transform: translateY(6px); animation: appear 0.35s ease forwards; }
.phone-message.from-person { align-self: flex-end; background: #2b5278; }
.phone-buttons { display: flex; gap: 6px; margin-top: 8px; }
.phone-buttons span { flex: 1; text-align: center; padding: 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); font-size: 12px; }

/* ---------- Which one ---------- */

.compare { max-width: 1100px; margin: 0 auto; padding: 72px 24px 36px; }
.compare-table { margin-top: 32px; border-radius: var(--radius); background: var(--card); padding: 8px 28px; }
.compare-row { display: grid; grid-template-columns: 0.6fr 1fr 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: var(--muted); }
.compare-row:last-child { border-bottom: 0; }
.compare-row [role="rowheader"], .compare-head { color: var(--ink); font-weight: 500; }

/* ---------- Download, questions ---------- */

.download { max-width: 1100px; margin: 0 auto; padding: 72px 24px 36px; }
.download-text p { color: var(--muted); font-size: 14px; max-width: var(--measure); }
.download-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.download-card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 26px 28px; border-radius: var(--radius); background: var(--card); }
.download-card-logo { height: 36px; width: auto; }
.download-needs { flex: 1; margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.download-needs li + li { margin-top: 4px; }

.faq { max-width: 1100px; margin: 0 auto; padding: 72px 24px 36px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list p { margin: 0 0 18px; color: var(--muted); }

/* The footer follows the aperintelligence.com redesign's (site.css .foot-*): a solid band
   with a brand column and three link columns, then the company line, and under it the legal
   links with the theme switch. */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--card); font-size: 12px; color: var(--muted); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 56px 24px 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; }
.footer-wordmark { height: 34px; width: auto; }
.foot-tagline { margin: 18px 0 0; max-width: 38ch; line-height: 1.6; }
.foot-contact { display: inline-block; margin-top: 14px; padding-block: 6px; font-weight: 500; color: var(--gold-soft); text-decoration: none; }
.foot-title { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col a, .legal a { display: inline-block; padding-block: 5px; text-decoration: none; transition: color 0.2s; }
.foot-col a:hover, .legal a:hover, .foot-contact:hover { color: var(--ink); }
.foot-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.foot-company { flex-basis: 100%; }  /* the company line takes its own row; the legal links and the theme switch share the next */
.legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
/* The two themes in a pill: the one in use is filled. */
.theme-switch { display: flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.theme-switch button { border: 0; background: none; color: var(--muted); font: 500 12px/1 var(--face), sans-serif; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.theme-switch button.is-on { background: var(--ink); color: var(--page); }

/* ---------- The cookie policy page (cookies.html) ---------- */

.policy { max-width: var(--measure); margin: 0 auto; padding: 48px 24px 24px; }
.policy h1 { font-size: clamp(26px, 3vw, 34px); }
.policy-updated { margin: 8px 0 0; font-size: 13px; color: var(--faint); }
.policy h2 { font-size: 17px; margin: 32px 0 8px; }
.policy p, .policy li { color: var(--muted); font-size: 14px; line-height: 1.65; }
.policy p { margin: 0 0 12px; }
.policy ul { margin: 0 0 12px; padding-left: 20px; }
.policy a { color: var(--ink); text-underline-offset: 3px; }
/* On a page whose footer has only the company line, that line opens the footer, so it needs no rule above it. */
.footer-inner > .foot-bottom:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Cookie card (cookie-consent.js) ---------- */

/* The aperintelligence.com card (site.css "cookie card"), on this page's tokens. */
#cookie-card {
  position: fixed;
  z-index: 60;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(300px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#cookie-card.is-visible { opacity: 1; transform: none; }
#cookie-card p { margin: 0; padding-right: 20px; }
#cookie-card a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cookie-close { position: absolute; top: 0; right: 0; width: 44px; height: 44px; background: none; border: 0; color: var(--muted); font-size: 12.6px; line-height: 1; cursor: pointer; }
.cookie-actions, .cookie-settings { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cookie-settings { justify-content: space-between; color: var(--ink); }
.cookie-settings[hidden] { display: none; }
.cookie-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: 600 12px/1 var(--face), sans-serif; color: var(--ink); background: transparent; border: 1px solid var(--line); transition: background-color 0.2s ease; }
/* Padding makes a 44px tap area; the matching negative margin keeps the card the same size. */
.cookie-link { margin: -13px 0 -13px auto; background: none; border: 0; padding: 13px 0; cursor: pointer; font: 12px var(--face), sans-serif; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) {
  .cookie-btn:hover { background-color: var(--soft); }
  .cookie-close:hover, .cookie-link:hover { color: var(--ink); }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1000px) {
  .raptor-intro, .product-intro { grid-template-columns: 1fr; gap: 40px; }
  .raptor-mock { justify-self: stretch; max-width: none; }
  .pro-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .control-list { grid-template-columns: 1fr; }
  .statement-card, .use-cases, .faq, .product-picks, .download-cards { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-row [role="rowheader"] { grid-column: 1 / -1; }
  .compare-head [role="columnheader"]:first-child { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .foot-brand { grid-column: 1 / -1; }
  .statement-card { padding: 36px 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .use-cases { justify-items: center; }
  .use-cases-text { justify-self: stretch; }
}

/* Below 768 the sidebar becomes a rail of avatars, as on the reference page. */
@media (max-width: 768px) {
  .app-window { grid-template-columns: 56px 1fr; height: 500px; }
  .app-window .app-sidebar { padding: 12px 8px; }
  .app-sidebar-top, .app-window .app-group, .app-window .app-row-text { display: none; }
  .app-window .app-row { justify-content: center; padding: 8px 0; }
  .app-chat { padding: 14px; }
  .chat-message { max-width: 94%; }
}

@media (max-width: 480px) {
  .facts, .pro-grid { grid-template-columns: 1fr; }
  .hero-lead { font-size: 15px; }
  .product-pick { padding: 22px 20px; }
  .product-pick-logo { height: 32px; }
  .compare-table { padding: 4px 18px; }
  .compare-row { gap: 12px; }
  .app-topbar-status { display: none; }
  .phone { width: 260px; height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chat-message, .phone-message { animation: none; opacity: 1; transform: none; }
  .hero-bg img { animation: none; }
}
