/* AI Origins: shared styles for every page on aiorigins.space
   © 2026 JCC LLC. All rights reserved.

   Layout: a single reading column (max 1080px) with a top bar, sections stacked,
   and an app grid on the home page. Each app page can set its own accent with
   --app-accent and --app-accent-2 on <body>.                                   */

:root {
  /* color tokens, light */
  --bg: #F4F5F8;
  --surface: #FFFFFF;
  --line: #DADDE6;
  --ink: #10131A;
  --muted: #5C6375;
  --cobalt: #2F5BFF;
  --orange: #E8600A;
  --app-accent: var(--cobalt);
  --app-accent-2: var(--orange);

  /* type tokens */
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0D12;
    --surface: #141720;
    --line: #262B38;
    --ink: #EEF1F6;
    --muted: #9AA2B6;
    --cobalt: #7D9BFF;
    --orange: #FF8A3D;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cobalt); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); line-height: 1.08; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.6vw, 34px); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; max-width: 65ch; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(19px, 2.4vw, 22px); color: var(--ink); }
.muted { color: var(--muted); }

/* ---------- sections ---------- */
.section { padding-block: 56px; display: grid; gap: 22px; }
.section + .section { border-top: 1px solid var(--line); }
.hero { padding-block: 72px 56px; display: grid; gap: 22px; }

/* ---------- app grid (home) ---------- */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.app-card {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.app-card:hover { border-color: var(--cobalt); transform: translateY(-2px); }
.app-card img { width: 72px; height: 72px; border-radius: 16px; }
.app-card .body { display: grid; gap: 6px; min-width: 0; align-content: start; }
.app-card p { font-size: 15px; color: var(--muted); }
.pill { justify-self: start; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.pill.live { border-color: var(--cobalt); color: var(--cobalt); }
.app-card.soon { border-style: dashed; background: transparent; }
.app-card.soon .ph { width: 72px; height: 72px; border-radius: 16px; border: 2px dashed var(--line); }

/* ---------- facts list ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.facts.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; align-content: start; }
.fact b { font-family: var(--display); font-size: 17px; }
.fact span { color: var(--muted); font-size: 15px; }

/* ---------- app page ---------- */
.app-hero { color: #F6F3EE; background: linear-gradient(180deg, #07080D 0%, #0F1D63 60%, #2F5BFF 100%); }
.app-hero .wrap { padding-block: 56px 64px; display: grid; gap: 20px; }
.app-hero .head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.app-hero .head img { width: 88px; height: 88px; border-radius: 20px; }
.app-hero h1 span { color: #FF7417; }
.app-hero .lede { color: #E4E9F8; }
.app-hero .eyebrow { color: #B9C3E6; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; font-weight: 700; font-size: 16px; text-decoration: none;
  border-radius: 12px; padding: 12px 18px; background: var(--app-accent-2); color: #140700;
}
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn[aria-disabled="true"] { opacity: .75; cursor: default; }
.feature-img { border-radius: var(--radius); border: 1px solid var(--line); }
.warning { border-left: 4px solid var(--orange); padding: 4px 0 4px 18px; display: grid; gap: 8px; }

/* ---------- policy ---------- */
.policy { display: grid; gap: 16px; }
.policy h2 { margin-top: 12px; font-size: 22px; }
.policy ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; max-width: 65ch; }
.meta { font-family: var(--mono); font-size: 14px; color: var(--muted); }

/* ---------- contact ---------- */
.email { font-family: var(--mono); font-size: 18px; user-select: all; word-break: break-all; }
.copy { font: 600 14px var(--body); background: var(--ink); color: var(--bg); border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.contact-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer .wrap { padding-block: 26px 36px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer a { color: var(--muted); }

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