/* Brand layer for the app (generated from css/site.css by web/scripts/build-brand-css.cjs; edit site.css, then run it). */
/* ---------- Tokens ---------- */
:root {
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  /* brand constants */
  --navy-950: #050a18;
  --navy-900: #081027;
  --navy-850: #0b1532;
  --navy-800: #101d42;
  --navy-700: #1a2a57;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-700: #0f766e;
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-700: #6d28d9;

  /* theme: dark (default) */
  --bg: var(--navy-950);
  --bg-raised: var(--navy-900);
  --surface: #0d1836;
  --surface-2: #122047;
  --surface-hover: #15264f;
  --line: rgba(160, 182, 232, 0.13);
  --line-strong: rgba(160, 182, 232, 0.24);
  --text: #eef2fb;
  --text-2: #c9d2e6;
  --muted: #9aa8c6;
  --accent: var(--teal-300);          /* accent text */
  --accent-2: var(--purple-300);      /* secondary accent text */
  --accent-bg: rgba(45, 212, 191, 0.12);
  --accent-2-bg: rgba(139, 92, 246, 0.16);
  --btn-bg: var(--teal-400);
  --btn-text: var(--navy-950);
  --btn-hover: var(--teal-300);
  --ghost-border: rgba(238, 242, 251, 0.28);
  --grad: linear-gradient(100deg, var(--teal-300) 0%, #8fd8f0 45%, var(--purple-300) 100%);
  --glow-1: rgba(45, 212, 191, 0.18);
  --glow-2: rgba(139, 92, 246, 0.22);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--line);
  --shadow-md: 0 14px 40px -18px rgba(0, 0, 0, 0.6);
  --focus: var(--teal-300);

  /* chat demo ("app") tokens */
  --app-bg: #0a1430;
  --app-rail: #070f26;
  --app-head: #0d1938;
  --app-bubble: #13224a;
  --app-bubble-me: #2a2166;
  --app-card: #0f1c40;
  --app-line: rgba(160, 182, 232, 0.14);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 10vw, 128px);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f9;
  --surface-hover: #f5f7fd;
  --line: rgba(11, 21, 50, 0.10);
  --line-strong: rgba(11, 21, 50, 0.18);
  --text: #0a1330;
  --text-2: #2a3557;
  --muted: #4c5878;
  --accent: var(--teal-700);
  --accent-2: var(--purple-700);
  --accent-bg: rgba(15, 118, 110, 0.09);
  --accent-2-bg: rgba(109, 40, 217, 0.08);
  --btn-bg: var(--navy-850);
  --btn-text: #ffffff;
  --btn-hover: var(--navy-700);
  --ghost-border: rgba(10, 19, 48, 0.25);
  --grad: linear-gradient(100deg, #0f766e 0%, #1d6fa3 45%, #6d28d9 100%);
  --glow-1: rgba(45, 212, 191, 0.20);
  --glow-2: rgba(139, 92, 246, 0.16);
  --shadow-lg: 0 30px 70px -28px rgba(11, 21, 50, 0.35), 0 0 0 1px var(--line);
  --shadow-md: 0 14px 34px -20px rgba(11, 21, 50, 0.35);
  --focus: var(--purple-700);

  --app-bg: #f7f8fc;
  --app-rail: #e9ecf6;
  --app-head: #ffffff;
  --app-bubble: #ffffff;
  --app-bubble-me: #e9e4ff;
  --app-card: #ffffff;
  --app-line: rgba(11, 21, 50, 0.10);

  color-scheme: light;
}

/* ---------- Base (app) ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; transition: background-color .3s ease, color .3s ease; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-text); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em; /* keep italic glyph tails from clipping */
}
/* ---------- Buttons ---------- */
.btn {
  --pad-y: 14px; --pad-x: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--pad-y) var(--pad-x); border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 10px 30px -12px var(--glow-1); }
.btn--primary:hover { background: var(--btn-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--ghost-border); }
.btn--ghost:hover { border-color: var(--text); transform: translateY(-1px); }
.btn--sm { --pad-y: 10px; --pad-x: 16px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand__name { font-family: var(--font-display); font-weight: 700; letter-spacing: .16em; font-size: 15px; }
.brand__sub { font-size: 13px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-strong); white-space: nowrap; }
.nav__links { display: flex; gap: 4px; list-style: none; }
.nav__links a { white-space: nowrap;
  display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none;
  font-size: 15px; color: var(--text-2); transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--text); background: var(--accent-bg); }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--accent-bg); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }
.mobile-menu { display: none; }

@media (max-width: 1080px) {
  .nav__links, .nav__actions .btn { display: none; }
  .menu-btn { display: inline-grid; }
  .brand__sub { display: none; }
  .mobile-menu {
    position: fixed; inset: 68px 0 auto 0; z-index: 49;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 24px; box-shadow: var(--shadow-md);
  }
  .mobile-menu.is-open { display: block; }
  .mobile-menu ul { list-style: none; display: grid; gap: 2px; margin-bottom: 16px; }
  .mobile-menu a:not(.btn) { display: block; padding: 12px 4px; text-decoration: none; font-size: 18px; font-family: var(--font-display); border-bottom: 1px solid var(--line); }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg-raised); font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.footer__grid ul { list-style: none; display: grid; gap: 10px; color: var(--text-2); }
.footer__grid a { text-decoration: none; color: var(--text-2); }
.footer__grid a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer__tag { color: var(--muted); margin-top: 14px; max-width: 320px; }
.footer__base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- App additions ---------- */
.dc-public-main { min-height: 60vh; padding: clamp(32px, 6vw, 72px) 0; }
.dc-public-main .fui-Card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.brand__sub--link { text-decoration: none; }
.dc-app-tabs { border-top: 1px solid var(--line); }
.dc-app-tabs .wrap { overflow-x: auto; }
.dc-avatar { border-radius: 999px; object-fit: cover; flex: none; }
.mobile-menu .btn--block + .btn--block { margin-top: 10px; }
/* The site resets lists and headings globally; here only inside the brand header and footer. */
.site-header ul, .site-footer ul { margin: 0; padding: 0; }
.site-footer h2, .site-footer p { margin-top: 0; }
.site-footer p { margin-bottom: 0; }
.site-header, .site-footer { line-height: 1.6; }
.nav__links a { white-space: nowrap; }
/* Fluent headings use the brand display face, as on the site. */
.fui-Title1, .fui-Title2, .fui-Title3, .fui-LargeTitle { font-family: var(--font-display); letter-spacing: -0.02em; }
.fui-Input { background-color: var(--surface-2); }
@media (max-width: 1240px) { .nav { gap: 14px; } .nav__links a { padding: 8px 8px; font-size: 14px; } .brand__sub { display: none; } }
