/*
 * The marketing site's one stylesheet.
 *
 * Tokens mirror lib/core/theme/app_colors.dart by ROLE, so a palette change
 * in the app is a matching edit here rather than a search for a hex code.
 * The site is light-only, as the app is.
 */
:root {
  color-scheme: light;
  --brand: #00b2ff;
  --brand-hover: #1fbdff;
  --brand-light: #57ccff;
  --brand-dark: #0080b8;
  --brand-faint: rgba(0, 178, 255, 0.06);
  --brand-subtle: rgba(0, 178, 255, 0.25);
  --accent-red: #ff2a2a;
  --accent-orange: #ffb361;
  --accent-green: #00d95f;
  --bg: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-surface: #f1f1f1;
  --bg-canvas: #f8fafc;
  --text: #171717;
  --text-secondary: #585858;
  --text-tertiary: #8a8a8a;
  --border: #e2e2e2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 23, 23, 0.06), 0 12px 32px rgba(23, 23, 23, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
  --gutter: 20px;
}

/* Hidden until the session probe in js/session.js has answered, so a
   signed-in visitor never sees the marketing page flash before /home. The
   probe removes the class itself, and caps its own wait. */
html.probing body { visibility: hidden; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--bg-surface); padding: 0.1em 0.4em; border-radius: 5px; }
kbd { font-family: var(--font); font-size: 0.85em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 0.4em; background: var(--bg); }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

/* ---- Header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 22px; margin-left: 8px; }
.site-nav a { color: var(--text-secondary); font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: #cbcbcb; }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { background: transparent; color: var(--brand-dark); }
.btn-ghost:hover { background: var(--brand-faint); }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn-on-dark { background: #fff; color: var(--brand-dark); }
.btn-on-dark:hover { background: #f1f1f1; }

/* ---- Hero ------------------------------------------------------------ */
.hero {
  background: linear-gradient(180deg, var(--brand-faint) 0%, var(--bg) 100%);
  padding-block: 72px 56px;
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { font-size: 19px; color: var(--text-secondary); margin: 20px 0 28px; max-width: 34em; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .fine { margin-top: 14px; color: var(--text-tertiary); font-size: 14px; }
.platforms { display: flex; gap: 18px; margin-top: 28px; color: var(--text-tertiary); font-size: 14px; flex-wrap: wrap; }
.platforms span { display: inline-flex; align-items: center; gap: 6px; }
.platforms svg { width: 18px; height: 18px; fill: currentColor; }

/* ---- Device frames --------------------------------------------------- */
.phone {
  width: min(320px, 100%); aspect-ratio: 9 / 19.2; margin: 0 auto;
  border-radius: 40px; background: #111; padding: 10px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.phone > * { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 31px; background: var(--bg-canvas); }
.phone.sm { width: min(260px, 100%); }
.browser {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow); background: var(--bg);
}
.browser .bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #d8d8d8; }
.browser .bar i:first-child { background: #ff5f57; }
.browser .bar i:nth-child(2) { background: #febc2e; }
.browser .bar i:nth-child(3) { background: #28c840; }
.browser > img, .browser > video { width: 100%; display: block; }
.frame-note { text-align: center; color: var(--text-tertiary); font-size: 13px; margin-top: 10px; }
.duo { display: flex; gap: 24px; justify-content: center; align-items: flex-end; }
.duo .phone { margin: 0; }

/* ---- Sections -------------------------------------------------------- */
.section { padding-block: 72px; }
.section.alt { background: var(--bg-canvas); }
.eyebrow { color: var(--brand-dark); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.section h2, .ai-band h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.02em; max-width: 22em; }
.section .lead, .ai-band .lead { font-size: 18px; color: var(--text-secondary); margin-top: 14px; max-width: 40em; }
.section-head { margin-bottom: 40px; }
.center { text-align: center; }
.center h2, .center .lead { margin-inline: auto; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-block: 36px; }
.feature.flip .feature-media { order: -1; }
.feature h3 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.feature p { color: var(--text-secondary); font-size: 16.5px; }
.feature ul { color: var(--text-secondary); padding-left: 1.2em; margin: 0 0 1em; }
.feature li { margin-bottom: 6px; }
.feature .more { font-weight: 600; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
}
.card h3 { font-size: 18px; font-weight: 700; }
.card p { color: var(--text-secondary); margin: 0; font-size: 15px; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-faint); color: var(--brand-dark); margin-bottom: 6px; }
.card .icon svg { width: 22px; height: 22px; fill: currentColor; }

/* Field-type chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border); font-size: 14px; font-weight: 500; color: var(--text);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.chip.red i { background: var(--accent-red); }
.chip.orange i { background: var(--accent-orange); }
.chip.green i { background: var(--accent-green); }

/* ---- The AI band ----------------------------------------------------- */
.ai-band {
  background: linear-gradient(135deg, #005f8a 0%, var(--brand-dark) 45%, var(--brand) 100%);
  color: #fff; padding-block: 80px;
}
.ai-band .eyebrow { color: rgba(255,255,255,0.8); }
.ai-band h2 { color: #fff; }
.ai-band .lead { color: rgba(255,255,255,0.88); }
.ai-band .feature p, .ai-band .feature li { color: rgba(255,255,255,0.88); }
.ai-band .feature h3 { color: #fff; }
.ai-band a { color: #fff; text-decoration: underline; }
.ai-band .card { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); backdrop-filter: blur(6px); }
.ai-band .card h3 { color: #fff; }
.ai-band .card p { color: rgba(255,255,255,0.86); }
.ai-band .card .icon { background: rgba(255,255,255,0.16); color: #fff; }
.ai-band .phone { background: #0b1220; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }

/* A fake chat, for the connector */
.chat { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.bubble { padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.45; max-width: 88%; }
.bubble.me { align-self: flex-end; background: #fff; color: var(--text); border-bottom-right-radius: 6px; }
.bubble.claude { align-self: flex-start; background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-bottom-left-radius: 6px; }
.bubble .who { display: block; font-size: 12px; font-weight: 700; opacity: 0.7; margin-bottom: 4px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---- Articles -------------------------------------------------------- */
.article-card { text-decoration: none; color: inherit; overflow: hidden; padding: 0; }
.article-card:hover { text-decoration: none; border-color: var(--brand-light); }
.article-card .cover { aspect-ratio: 16 / 9; background: var(--bg-canvas); object-fit: cover; width: 100%; }
.article-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.article-card .kicker { font-size: 12px; font-weight: 700; color: var(--brand-dark); letter-spacing: 0.06em; text-transform: uppercase; }
.article-card h3 { font-size: 18px; }
.article-card p { font-size: 14.5px; }

/* Article pages */
.article-hero { padding-block: 56px 24px; }
.article-hero .kicker { color: var(--brand-dark); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.article-hero h1 { font-size: clamp(32px, 4.5vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.article-hero .standfirst { font-size: 19px; color: var(--text-secondary); margin-top: 16px; }
.article-hero .meta { color: var(--text-tertiary); font-size: 14px; margin-top: 14px; }
.article-body { padding-block: 16px 64px; font-size: 17px; }
.article-body h2 { font-size: 26px; font-weight: 800; margin: 44px 0 14px; }
.article-body h3 { font-size: 20px; font-weight: 700; margin: 30px 0 10px; }
.article-body p, .article-body li { color: #2b2b2b; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: 6px; }
.article-body figure { margin: 28px 0; }
.article-body figcaption { color: var(--text-tertiary); font-size: 14px; text-align: center; margin-top: 10px; }
.article-body .phone { margin-block: 8px; }
.article-body .duo .phone { margin: 0; }
.callout {
  border-left: 4px solid var(--brand); background: var(--brand-faint); padding: 14px 18px;
  border-radius: 0 10px 10px 0; margin: 24px 0; font-size: 16px;
}
.callout.caution { border-color: var(--accent-orange); background: rgba(255, 179, 97, 0.14); }
.callout p:last-child { margin-bottom: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0; }
.steps li { position: relative; padding-left: 48px; margin-bottom: 18px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px;
}
.steps li strong { display: block; margin-bottom: 2px; }
.field-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15.5px; }
.field-table th, .field-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.field-table th { font-weight: 700; color: var(--text-secondary); font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }
.article-nav { border-top: 1px solid var(--border); padding-block: 32px; }
.article-nav .grid-3 { margin-top: 20px; }

/* ---- Closing CTA and footer ----------------------------------------- */
.closing { padding-block: 88px; text-align: center; background: var(--bg-canvas); border-top: 1px solid var(--border); }
.closing h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-inline: auto; }
.closing p { color: var(--text-secondary); font-size: 18px; margin: 14px auto 28px; max-width: 34em; }
.site-footer { border-top: 1px solid var(--border); padding-block: 32px; color: var(--text-tertiary); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.site-footer a { color: var(--text-secondary); }
.site-footer .copy { margin-left: auto; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 900px) {
  .hero .wrap, .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .feature-media { order: 0; }
  .feature-media { order: 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .hero { padding-block: 48px 40px; }
  .section { padding-block: 56px; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .duo { flex-direction: column; align-items: center; }
  .hero .lead { font-size: 17px; }
  .btn-lg { width: 100%; }
  .hero .cta-row .btn { flex: 1 1 auto; }
  .site-footer .copy { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* A printed page, as opposed to a screen. */
.sheet { max-width: 560px; margin: 0 auto; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; }
.sheet img { width: 100%; display: block; }
